-
Notifications
You must be signed in to change notification settings - Fork 303
Fixes #37816 - List view_smart_proxies as valid permission for non admin user #11141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
27dec72
to
312a9b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works good:
$ curl -k -u unauth:unauth https://satellite.redhat.com/katello/api/capsules/
{
"error": {"message":"Access denied","details":"Missing one of the required permissions: view_smart_proxy, manage_capsule_content, view_capsule_content","missing_permissions":["view_smart_proxy","manage_capsule_content","view_capsule_content"]}
}
$ curl -k -u unauth:unauth https://satellite.redhat.com/katello/api/capsules/2
{
"error": {"message":"Access denied","details":"Missing one of the required permissions: view_smart_proxy, manage_capsule_content, view_capsule_content","missing_permissions":["view_smart_proxy","manage_capsule_content","view_capsule_content"]}
}
(unauth
is an user with insufficient permissions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we go plural?
312a9b8
to
6e2b607
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks we are good now. Thanks for the patch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.. 🎉
What are the changes introduced in this pull request?
view_smart_proxies
permission is needed from Foreman, we did not have this before and would only list Katello permissions. We hard codeview_smart_proxies
here when getting the proxies from Foremankatello/app/controllers/katello/api/v2/capsules_controller.rb
Line 13 in 746bda7
Considerations taken when implementing this change?
What are the testing steps for this pull request?
view_capsule_content
andmanage_capsule_content
curl -k -u unauth:unauth https://localhost/katello/api/capsules/
view_smart_proxies
permission