Bug 1761404

Summary: Clone of Organization admin role can not create location
Product: Red Hat Satellite Reporter: Amaani S Karimi <akarimi>
Component: Users & RolesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Radovan Drazny <rdrazny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: bkearney, lstejska, mhulan, oezr
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-17 20:59:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Amaani S Karimi 2019-10-14 10:51:37 UTC
Description of problem:

>> User is not able to create or view locations when assigned a cloned role for "Organization Admin" even when its filters have "create location" field added by default.

Version-Release number of selected component (if applicable):

>> 6.4.0

How reproducible:

100%


Steps to Reproduce:

>> Clone the "Organization Admin" Role shipped by satellite and assign it to a user.

>> Filters in the role for "Location" says that user should be able to create and view the locations.

>> User is assigned to the appropriate location.

Actual results:

User not able to see or create a location


Expected results:

User should be able to create a new location.

Additional info:

N/A

Comment 3 Ondřej Ezr 2020-02-13 12:50:55 UTC
I can see the locations, but the creating clearly doesn't work.

It don't allow me to create it with error:
"You don't have permission create_locations with attributes that you have specified or you don't have access to specified organizations or locations"

Comment 4 Ondřej Ezr 2020-02-14 09:05:19 UTC
Created redmine issue https://projects.theforeman.org/issues/29012 from this bug

Comment 7 Ondřej Ezr 2020-03-04 00:02:03 UTC
This clearly works in satellite 6.4, but doesn't work in upstream.
Amaani could you please confirm what version have you tested this on?

I've further noticed, that upstream while cloning the role, the unlimited flag in filters for the cloned role are unselected. There was a recent change in this flag seting, I'd susspect that could be the cause.
The flag got unselected on clone and than the filter is used with an empty search, what would not work.

Comment 9 Ondřej Ezr 2020-03-12 01:20:26 UTC
We've digged deeper into this and the actuall issue appears to be present only if user assigns the newly cloned role some locations. Than user with this role can manage only locations assigned to this role, so he can't create new one.

That's actually correct behaviour, only bit unclear UX.

Comment 16 Ondřej Ezr 2020-04-20 00:28:14 UTC
*** Bug 1760701 has been marked as a duplicate of this bug. ***

Comment 17 Ondřej Ezr 2020-04-20 00:43:35 UTC
I've created https://bugzilla.redhat.com/show_bug.cgi?id=1825698 to track the real issue.

Comment 18 Bryan Kearney 2020-04-22 20:30:49 UTC
Based on comment 17, should I close this?

Comment 19 Ondřej Ezr 2020-04-22 22:00:18 UTC
Yes, could you, I do not know how to properly reference the new BZ.

Comment 20 Bryan Kearney 2020-06-17 20:59:33 UTC
closing this based on comment 17.