Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1245624 - Taxonomy selectors are empty even for users with assign permissions
Taxonomy selectors are empty even for users with assign permissions
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: Unused
Assigned To: Marek Hulan
Jitendra Yejare
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks: 1136910
  Show dependency treegraph
 
Reported: 2015-07-22 08:18 EDT by Marek Hulan
Modified: 2016-07-27 04:54 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 04:54:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


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

  None (edit)
Description Marek Hulan 2015-07-22 08:18:32 EDT
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 08:18:33 EDT
Created from redmine issue http://projects.theforeman.org/issues/11187
Comment 3 Bryan Kearney 2015-08-14 13:02:06 EDT
Upstream bug assigned to mhulan@redhat.com
Comment 6 Jitendra Yejare 2016-05-04 05:20:04 EDT
Please provide repro steps from QE/user perspective.
Comment 7 Marek Hulan 2016-05-05 06:40:21 EDT
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 06:59:51 EDT
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 04:54:01 EDT
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.

https://access.redhat.com/errata/RHBA-2016:1500

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