Bug 1230884
Summary: | hammer role filter does work with ID but not with name | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Dirk Herrmann <dherrman> |
Component: | API | Assignee: | Eric Helms <ehelms> |
Status: | CLOSED ERRATA | QA Contact: | Og Maciel <omaciel> |
Severity: | high | Docs Contact: | Russell Dickenson <rdickens> |
Priority: | unspecified | ||
Version: | 6.1.0 | CC: | bbuckingham, chpeters, cwelton, mhulan, mmccune, omaciel, pcfe, rdickens, sghai |
Target Milestone: | Unspecified | Keywords: | ReleaseNotes, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/11303 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Known Issue | |
Doc Text: |
* Issue
If you attempt to assign permissions to a role, using the roles' names, you might see the following error message:
---
Could not create the permission filter:
Permissions Permissions must be of same resource type
---
* Workaround
Specify the roles by their unique identifiers. For example:
---
$ hammer filter create --permission-ids 115,116,117,118,119 --role dhtest
Permission filter for [Puppetclass] created
---
To list available roles and their identifiers, use the following command:
---
hammer filter available-permissions
---
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-10-15 18:20:12 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1190823 |
Description
Dirk Herrmann
2015-06-11 17:09:14 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. Reassigning to Eric which already provided fix. To find ids of permissions you can use following hammer command hammer filter available-permissions The cause is that permissions controller didn't support searching of parameters by scoped search which hammer uses to resolve names to ids. Moving to POST since upstream bug http://projects.theforeman.org/issues/11303 has been closed ------------- Eric Helms Applied in changeset commit:2dec184c083bb0e6a2404de30083f2d8aa491a96. I can still see the original reported issue with sat6.1.2 snap1. Could not create the permission filter: Permissions Permissions must be of same resource type rubygem-hammer_cli_foreman-0.1.4.14-1.el7sat.noarch foreman-1.7.2.35-1.el7sat.noarch ruby193-rubygem-katello-2.2.0.67-1.el7sat.noarch katello-installer-2.3.18-1.el7sat.noarch rubygem-hammer_cli_katello-0.0.7.17-1.el7sat.noarch katello-2.2.0.15-1.el7sat.noarch Upstream bug component is API Moving to POST since upstream bug http://projects.theforeman.org/issues/11303 has been closed ------------- Eric Helms Applied in changeset commit:2dec184c083bb0e6a2404de30083f2d8aa491a96. Using permission names: hammer> role create --name dhtest User role [dhtest] created hammer> filter create --permissions view_puppetclasses,create_puppetclasses,edit_puppetclasses,destroy_puppetclasses,import_puppetclasses --role dhtest Permission filter for [Puppetclass] created hammer> filter info --id 164 Id: 164 Resource type: Puppetclass Search: none Unlimited?: yes Role: dhtest Permissions: view_puppetclasses, create_puppetclasses, edit_puppetclasses, destroy_puppetclasses, import_puppetclasses Created at: 2015/10/05 20:02:40 Updated at: 2015/10/05 20:02:40 Using permission IDs: hammer> role create --name dhtest2 User role [dhtest2] created hammer> filter create --permission-ids 115,116,117,118,119 --role dhtest2 Permission filter for [Puppetclass] created hammer> filter info --id 165 Id: 165 Resource type: Puppetclass Search: none Unlimited?: yes Role: dhtest2 Permissions: view_puppetclasses, create_puppetclasses, edit_puppetclasses, destroy_puppetclasses, import_puppetclasses Created at: 2015/10/05 20:07:16 Updated at: 2015/10/05 20:07:16 Verified using Satellite-6.1.0-RHEL-7-20151002.0 compose/ 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-2015:1911 |