Bug 1497073
| Summary: | Can't edit host collection if permission is limited to a edit_host_collections | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Ranjan Kumar <rankumar> | ||||
| Component: | Host Collections | Assignee: | satellite6-bugs <satellite6-bugs> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Nikhil Kathole <nkathole> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.2.11 | CC: | bbuckingham, bkearney, ehelms, jsherril, nkathole | ||||
| Target Milestone: | Unspecified | Keywords: | Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | tfm-rubygem-katello-3.4.5.52-1 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-02-21 16:54:37 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: | |||||||
| Attachments: |
|
||||||
|
Description
Ranjan Kumar
2017-09-29 06:59:05 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21156 has been resolved. FailedQA Version Tested: Satellite-6.3 Snap 19 steps: 1. Created role with view_host_collections, edit_host_collections 2. Created user with this role 3. Login with created user Not able to edit host collection's Name, description and Content Host Limit. Created attachment 1336295 [details]
screenshot of UI
moving back to ON_DEV, it looks like the cherry pick did not happen. FailedQA Version Tested: Satellite-6.3 Snap 31 steps: Followed same steps as per comment #3. Still not able to edit host collection's Name, description and Content Host Limit from UI. logs in production.log ===> 2018-01-10 03:50:47 04a9773f [app] [I] Started GET "/host-collections/details/views/host-collection-details.html" for IP at 2018-01-10 03:50:47 -0500 2018-01-10 03:50:47 6edc0c78 [app] [I] Started GET "/host-collections/details/views/host-collection-info.html" for IP at 2018-01-10 03:50:47 -0500 2018-01-10 03:50:47 da7d7f28 [app] [I] Started GET "/layouts/details-page-with-breadcrumbs.html" for IP at 2018-01-10 03:50:47 -0500 2018-01-10 03:50:48 bbd94a2c [app] [I] Started GET "/layouts/partials/page-loading-indicator.html" for IP at 2018-01-10 03:50:48 -0500 2018-01-10 03:50:48 3f65ed83 [app] [I] Started GET "/layouts/partials/full-row-breadcrumbs.html" for IP at 2018-01-10 03:50:48 -0500 2018-01-10 03:50:48 d03b3d0f [app] [I] Started GET "/layouts/two-column-details.html" for IP at 2018-01-10 03:50:48 -0500 2018-01-10 03:50:48 dcb1b155 [app] [I] Started GET "/common/views/select-action-dropdown.html" for IP at 2018-01-10 03:50:48 -0500 2018-01-10 03:50:49 70965396 [app] [I] Started GET "/katello/api/v2/host_collections/2?fields=full" for IP at 2018-01-10 03:50:49 -0500 2018-01-10 03:50:49 70965396 [app] [I] Processing by Katello::Api::V2::HostCollectionsController#show as JSON 2018-01-10 03:50:49 70965396 [app] [I] Parameters: {"fields"=>"full", "api_version"=>"v2", "id"=>"2"} 2018-01-10 03:50:49 70965396 [app] [I] Current user: host_collection (regular user) 2018-01-10 03:50:49 70965396 [app] [I] Expire fragment views/tabs_and_title_records-5 (0.3ms) 2018-01-10 03:50:49 624276d7 [app] [I] Started GET "/components/views/bst-resource-switcher.html" for IP at 2018-01-10 03:50:49 -0500 2018-01-10 03:50:49 24f8c4d3 [app] [I] Started GET "/components/views/bst-edit-text.html" for IP at 2018-01-10 03:50:49 -0500 2018-01-10 03:50:49 4c3732c6 [app] [I] Started GET "/components/views/bst-edit-textarea.html" for IP at 2018-01-10 03:50:49 -0500 2018-01-10 03:50:49 12ac1414 [app] [I] Started GET "/components/views/bst-edit-custom.html" for IP at 2018-01-10 03:50:49 -0500 2018-01-10 03:50:49 70965396 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.45/app/views/katello/api/v2/host_collections/show.json.rabl within katello/api/v2/layouts/resource (53.5ms) 2018-01-10 03:50:49 70965396 [app] [I] Completed 200 OK in 132ms (Views: 74.9ms | ActiveRecord: 14.6ms) 2018-01-10 03:50:49 6b2893f2 [app] [I] Started GET "/components/views/bst-edit.html" for IP at 2018-01-10 03:50:49 -0500 2018-01-10 03:50:50 fd1d31f6 [app] [I] Started GET "/components/views/bst-edit-save-cancel.html" for IP at 2018-01-10 03:50:50 -0500 2018-01-10 03:50:57 46820eb2 [app] [I] Started GET "/notification_recipients" for IP at 2018-01-10 03:50:57 -0500 2018-01-10 03:50:57 46820eb2 [app] [I] Processing by NotificationRecipientsController#index as JSON 2018-01-10 03:50:57 46820eb2 [app] [I] Current user: host_collection (regular user) 2018-01-10 03:50:57 46820eb2 [app] [I] Expire fragment views/tabs_and_title_records-5 (0.1ms) 2018-01-10 03:50:57 46820eb2 [app] [I] Completed 200 OK in 29ms (Views: 0.2ms | ActiveRecord: 4.3ms) 2018-01-10 03:51:09 25d32b0f [app] [I] Started GET "/notification_recipients" for IP at 2018-01-10 03:51:09 -0500 2018-01-10 03:51:09 25d32b0f [app] [I] Processing by NotificationRecipientsController#index as JSON 2018-01-10 03:51:09 25d32b0f [app] [I] Current user: host_collection (regular user) 2018-01-10 03:51:09 25d32b0f [app] [I] Expire fragment views/tabs_and_title_records-5 (0.1ms) 2018-01-10 03:51:09 25d32b0f [app] [I] Completed 200 OK in 25ms (Views: 0.1ms | ActiveRecord: 4.2ms) It is working fine with CLI # hammer -u host_collection -p changeme shell Welcome to the hammer interactive shell Type 'help' for usage information hammer> host-collection list ---|------------------------|-------|------------ ID | NAME | LIMIT | DESCRIPTION ---|------------------------|-------|------------ 2 | RHEL 6 Host collection | None | 1 | RHEL 7 Host collection | None | ---|------------------------|-------|------------ hammer> host-collection info --id 1 ID: 1 Name: RHEL 7 Host collection Limit: None Description: Total Hosts: 0 hammer> host-collection update --new-name 'RHEL new' --id 1 Host collection updated hammer> host-collection list ---|------------------------|-------|------------ ID | NAME | LIMIT | DESCRIPTION ---|------------------------|-------|------------ 2 | RHEL 6 Host collection | None | 1 | RHEL new | None | ---|------------------------|-------|------------ This shouldn't have been moved to ON_DEV without a cherry pick, moving to POST VERIFIED
Version tested:
Satellite 6.3 snap 33
Found able to edit host collection's Name, description and Content Host Limit with view_host_collections, edit_host_collections role filters.
2018-01-22 06:13:30 fe49862e [app] [I] Started PUT "/katello/api/v2/host_collections/2" for IP at 2018-01-22 06:13:30 -0500
2018-01-22 06:13:30 fe49862e [app] [I] Processing by Katello::Api::V2::HostCollectionsController#update as JSON
2018-01-22 06:13:30 fe49862e [app] [I] Parameters: {"host_ids"=>[], "name"=>"RHEL 6 Host collection update", "organization_id"=>1, "max_hosts"=>nil, "description"=>nil, "total_hosts"=>0, "unlimited_hosts"=>true, "created_at"=>"2018-01-21 18:46:50 UTC", "updated_at"=>"2018-01-21 18:46:50 UTC", "id"=>"2", "permissions"=>{"deletable"=>false, "editable"=>true}, "api_version"=>"v2", "host_collection"=>{"id"=>"2", "name"=>"RHEL 6 Host collection update", "description"=>nil, "max_hosts"=>nil, "organization_id"=>1, "created_at"=>"2018-01-21 18:46:50 UTC", "updated_at"=>"2018-01-21 18:46:50 UTC", "unlimited_hosts"=>true, "host_ids"=>[]}}
2018-01-22 06:13:30 fe49862e [app] [I] Current user: host_collection (regular user)
2018-01-22 06:13:30 fe49862e [app] [I] Expire fragment views/tabs_and_title_records-4 (0.1ms)
2018-01-22 06:13:30 fe49862e [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.54/app/views/katello/api/v2/host_collections/show.json.rabl within katello/api/v2/layouts/resource (15.8ms)
2018-01-22 06:13:30 fe49862e [app] [I] Completed 200 OK in 57ms (Views: 11.1ms | ActiveRecord: 14.5ms)
2018-01-22 06:13:30 1a864563 [app] [I] Started GET "/notification_recipients" for IP at 2018-01-22 06:13:30 -0500
2018-01-22 06:13:30 1a864563 [app] [I] Processing by NotificationRecipientsController#index as JSON
2018-01-22 06:13:30 1a864563 [app] [I] Current user: host_collection (regular user)
2018-01-22 06:13:30 1a864563 [app] [I] Expire fragment views/tabs_and_title_records-4 (0.1ms)
2018-01-22 06:13:30 1a864563 [app] [I] Completed 200 OK in 21ms (Views: 0.1ms | ActiveRecord: 3.9ms)
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/RHSA-2018:0336
|