Filter management with hamemr seems to be missing means of associating resource type
I'm trying to manage creation of roles and their associated permissions. Haven't figured out how. This was as close as I could determine and it doesnt work.
hammer> filter create --role "Content Viewer" --permissions "view_gpg_keys,view_content_views" Could not create the permission filter: Permissions Permissions must be of same resource type hammer> filter update --organization-ids 1 --id 76 --role "Content Viewer" --permissions view_products Could not update the permission filter: Permissions Permissions must be of same resource type Organization ids You can't assign organizations to this resource hammer> filter update --organization-ids 1 --id 76 --role "Content Viewer" --permissions view_products -^t^t --help --location-ids --organization-ids --permission-ids --role --search --id --locations --organizations --permissions --role-id -h
Fixes #11303: Allow scoped search by name for permissions.
This both provides this functionality and fixes an issue with creating
filters using hammer. Hammer attempts to search for a permission by
name using scoped search syntax when creating a filter with the
--permission=view_domains style syntax. However, this was defaulting to
returning all permissions instead of scoped permissions.
#2 Updated by Eric Helms about 4 years ago
After some investigation this appears to be an error with the expectation of hammer when providing a permission name to go and search the API for a permission with the name supplied by the user. However, permissions aren't currently outfitted for scoped search usage and thus all permissions are returned and a filter is attempted to be created with them and thus the error mentioned is generated.