Bug 1245624 - Taxonomy selectors are empty even for users with assign permissions
Summary: Taxonomy selectors are empty even for users with assign permissions
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Jitendra Yejare
URL: http://projects.theforeman.org/issues...
Depends On:
Blocks: 1136910
TreeView+ depends on / blocked
Reported: 2015-07-22 12:18 UTC by Marek Hulan
Modified: 2019-09-25 21:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 08:54:01 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 11187 None None None 2016-04-22 16:01:34 UTC
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Marek Hulan 2015-07-22 12:18:32 UTC
A "patch":https://github.com/theforeman/foreman/commit/887e2fd9 that added authorization to multiple selects broke the taxonomies selects. It calls authorized without any arguments which means it check for any permission for a default resource (which is self). This can't work for Taxonomy (and other STI models) because permissions are mapped to children resources. Also I think that there should be view_$resource permission checked instead of any permission (not 100% sure about this though).

Comment 1 Marek Hulan 2015-07-22 12:18:33 UTC
Created from redmine issue http://projects.theforeman.org/issues/11187

Comment 3 Bryan Kearney 2015-08-14 17:02:06 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 6 Jitendra Yejare 2016-05-04 09:20:04 UTC
Please provide repro steps from QE/user perspective.

Comment 7 Marek Hulan 2016-05-05 10:40:21 UTC
Steps to verify

1. create a user (not admin) with view_organizations and assign_organizations permissions filtered with expression 'name ~ visible*'.
2. create 3 organizations with names "visible1", "visible2", "hidden"
3. put user to organization visible1
4. create some taxable resource, e.g. domain and assign it to organizations visible1 and hidden
5. make sure user have permissions to view and edit the resource
6. make sure the user does not have other roles giving him full access to organizations (e.g. Manager role)
7. log in as user and edit the resource (domain), in the form you should see Organizations tab listing only visible1 and visible2, assign them both
8. it should save the resource
9. re-login as admin and verify that the resource belongs to visible1, visible2 and also it remained assigned to hidden organization

Without the fix, you'd always see empty list of organizations as user.

Comment 8 Jitendra Yejare 2016-07-19 10:59:51 UTC
Verified !

@ Sat 6.2 Snap 20.2 GA

Followed steps from Comment 7 and I observed the expected behavior mentioned in step 9 as : 
After re-login as admin and verified that the resource belongs to visible1, visible2 and remained assigned to hidden organization as well.

So moving this BZ to verified state!

Comment 10 errata-xmlrpc 2016-07-27 08:54:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.