Project

General

Profile

Bug #9687

Provisioning Template Roles: view_template, edit_template doesn't render on 1.7.3 for non-admin

Added by Will Foster over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

There seems to be an error with non-admin users given the view_template and edit_template filters
inside a role for provisioning templates. This worked in prior versions (at least since 1.6.3).

The same view work as admin.

== UI ==
Hosts -> provisioning templates -> generic_atomic (is viewable)
** starts to load edit windows then:
ConfigTemplate Not Found
Please try to update your request
== debug logs ==
  ^[[1m^[[35mConfigTemplate Load (0.2ms)^[[0m  SELECT `config_templates`.* FROM `config_templates` WHERE `config_templates`.`name` = '105-generic_atomic' AND (1=0) ORDER BY config_templates.name LIMIT 1
  ^[[1m^[[36mConfigTemplate Load (0.2ms)^[[0m  ^[[1mSELECT `config_templates`.* FROM `config_templates` WHERE `config_templates`.`id` = 105 AND (1=0) ORDER BY config_templates.name LIMIT 1^[[0m
not found: Couldn't find ConfigTemplate with id=105-generic_atomic [WHERE (1=0)]
  Rendered common/404.html.erb (1.5ms)
Completed 404 Not Found in 47ms (Views: 2.9ms | ActiveRecord: 2.6ms)

The filter "view_template, edit_template" under the "Provisioning Template" category is added to a dedicated role.
This role is added to the user group which experiences the issue.


Related issues

Related to Foreman - Bug #10634: API user can't edit templates without admin rightsResolved2015-05-28
Related to Foreman - Bug #14000: Non-admin user receives permissions error on config_templates APIClosed2016-03-02
Has duplicate Foreman - Bug #13996: Hammer - Unable to create a read only user to dump templatesDuplicate2016-03-01

Associated revisions

Revision a63aa7cb (diff)
Added by Marek Hulán over 6 years ago

Fixes #9687 - respect custom controller permissions

Revision 735eca5c (diff)
Added by Marek Hulán over 6 years ago

Fixes #9687 - respect custom controller permissions

(cherry picked from commit a63aa7cbac0f81955ac9ebcf010bfcf45f5b07c1)

History

#1 Updated by Dominic Cleal over 6 years ago

  • Description updated (diff)

#2 Updated by Andy Taylor over 6 years ago

Can confirm I'm also seeing this on 1.7.2.

#3 Updated by Will Foster over 6 years ago

Andy Taylor wrote:

Can confirm I'm also seeing this on 1.7.2.

As an update, we've upgraded to 1.7.4 and are still seeing this (EL6)

foreman-libvirt-1.7.4-1.el6.noarch
foreman-1.7.4-1.el6.noarch
openstack-foreman-installer-2.0.12-2.el6ost.noarch
ruby193-rubygem-foreman_dhcp_browser-0.0.6-1.el6.noarch
ruby193-rubygem-foreman_docker-1.2.4-1.fm1_7.el6.noarch
foreman-proxy-1.7.4-1.el6.noarch
ruby193-rubygem-foreman_column_view-0.2.0-1.el6.noarch
rubygem-foreman_api-0.1.11-4.el6sat.noarch
rubygem-hammer_cli_foreman-0.1.3-1.el6.noarch
foreman-installer-1.7.4-1.el6.noarch
foreman-selinux-1.7.4-1.el6.noarch
foreman-mysql2-1.7.4-1.el6.noarch
ruby193-rubygem-foreman-tasks-0.6.4-1.el6.noarch
foreman-compute-1.7.4-1.el6.noarch

#4 Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2334 added
  • Pull request deleted ()

#5 Updated by Marek Hulán over 6 years ago

  • Assignee set to Marek Hulán

#6 Updated by Dominic Cleal over 6 years ago

  • Legacy Backlogs Release (now unused) set to 50

#7 Updated by Marek Hulán over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#8 Updated by Dominic Cleal over 6 years ago

  • Related to Bug #10634: API user can't edit templates without admin rights added

#9 Updated by Dominic Cleal over 5 years ago

  • Related to Bug #14000: Non-admin user receives permissions error on config_templates API added

#10 Updated by Dominic Cleal over 5 years ago

  • Has duplicate Bug #13996: Hammer - Unable to create a read only user to dump templates added

Also available in: Atom PDF