Bug #32117
openpolicies_enc api endpoint is not working for non-admin user.
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1924377
Description of problem: API policy_enc fails with error "missing permission"
All required permission is assigned
https://satellite.example.com/api/hosts/host.example.com/policies_enc
The response received:
{
"error": {
"message": "Access denied",
"details": "Missing one of the required permissions: view_hosts",
"missing_permissions": [
"view_hosts"
]
}
}
- hammer user info --login ranjan
Id: 72
Login: ranjan
Name: ranjan kumar
Email: rr@r.com
Admin: no
Disabled: no
Last login:
Authorized by: Internal
Effective admin: no
Roles:
abc
User groups:
Inherited User groups:
Locations:
Redhat
Organizations:
Pune
[root@vm255-31 ~]# hammer role filters --name abc
----|---------------|--------|------------|-----------|------|-----------------------------------------
ID | RESOURCE TYPE | SEARCH | UNLIMITED? | OVERRIDE? | ROLE | PERMISSIONS
----|---------------|--------|------------|-----------|------|-----------------------------------------
611 | Host | none | yes | no | abc | view_hosts, edit_hosts
612 | Organization | none | yes | no | abc | view_organizations, assign_organizations
613 | Location | none | yes | no | abc | view_locations, assign_locations
----|---------------|--------|------------|-----------|------|-----------------------------------------
Version-Release number of selected component (if applicable): Satellite 6.9
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
No data to display