| Summary: | Problem with accessing content host page with custom roles | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Paul Gozart <pgozart> |
| Component: | Hosts - Content | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.2.2 | CC: | bbuckingham, bnh1, dhawke, dhlavacd, jalviso, jcallaha, jnikolak, jsherril, jucastro, pgozart, satellite6-bugs |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-01 15:14:51 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: | |
|
Description
Paul Gozart
2016-10-20 18:23:27 UTC
Based on the scenario provided in the initial description, it looks like the non-admin user will also need to have the following filter added to their role: - Resource: Organization - Permissions: view_organizations Note: the organizations can be limited to those that the user should be restricted to. I have tested this on a 6.2.2 configuration and it is allowing my user to view Content -> Content Hosts. Can you please confirm that the same works for you? (In reply to Brad Buckingham from comment #4) > Based on the scenario provided in the initial description, it looks like the > non-admin user will also need to have the following filter added to their > role: > > - Resource: Organization > - Permissions: view_organizations > > Note: the organizations can be limited to those that the user should be > restricted to. > > I have tested this on a 6.2.2 configuration and it is allowing my user to > view Content -> Content Hosts. > > Can you please confirm that the same works for you? I got word from the customer that 'view_organizations' was the problem. This BZ can be closed unless we feel like there is something we can do to avoid this confusion in the future such as notification that the action cannot be performed due to insufficient permissions. Simply "Loading..." endlessly might not be ideal. From initial investigation, it appears that the behavior on Content Hosts is inconsistent with some of the other pages (e.g. Activation Keys, Products, Sync Plans, Host Collections...). When accessing those pages, the UI also sends to the server the organization_id to support filtering the content that will be returned; however, the API does not specifically reject returning the content based upon the organization permission. I am going to assign this bugzilla over to the Host component to see if perhaps the API could be altered to provide similar behavior to the katello APIs for this case. If not, we may want to defer (or close) this bugzilla as the issue should/could ultimately be addressed if/when the Host and Content Host UIs are unified in the future. The following is an example of the API invoked by Content Hosts ui: GET api/v2/hosts?organization_id=1 Did the user attempt to add the view_organization permission to their custom role? (Please see bugzilla comment 4.) Hi Brad, Thank you, adding "view_organization" allows the user to view the Content Host it is filtered to view. Now the adverse effect is; when creating a Host Group using this User, it won't create. It does not allow to add any organization as it is only Viewing. Previously without adding Organization Filter, HG is created defaulting to the User assigned organization. I have workaround this by adding permission "assigned_organization" then further adding search filter "name ~ user_org". I haven't checked though what else is affected. Cheers, Josephine Josephine, yes your workaround is expected. You need the 'assign_organization' and 'assign_location' permissions in order to create a hostgroup with that org and location. The issue around needing a 'view_organization' permission to see content_hsots appears to be resolved in 6.3. I created a role with just "view_hosts", and the user can see hosts on both the host and content_host page with no problem. |