-
Notifications
You must be signed in to change notification settings - Fork 897
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
Make request APIs consistent by restricting access to automation/provision requests to admin/requester #15186
Make request APIs consistent by restricting access to automation/provision requests to admin/requester #15186
Conversation
2e6efdb
to
618a550
Compare
Checked commits imtayadeway/manageiq@1ae66cc~...618a550 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@@ -41,5 +41,16 @@ def deny_resource(type, id, data) | |||
rescue => err | |||
action_result(false, err.to_s) | |||
end | |||
|
|||
def find_automation_requests(id) |
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.
seem similar to the find_provision_requests, anyway we can have common code ?
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.
It might be good to do this as a follow up since there might be more opportunities to do this outside the scope of fixing these two endpoints
klass.find_by!(:requester => User.current_user, :id => id) | ||
end | ||
|
||
def automation_requests_search_conditions |
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.
same here
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.
Same as above - this issue is broader than this PR, so might be best done in a follow up
@imtayadeway bump |
@abellotti bump |
LGTM 🎹 @imtayadeway please have a follow up PR to eliminate the common code (find_*_requests). Thanks. |
Caused by collision of ManageIQ#15430 and ManageIQ#15186
These were broken by the introduction of ManageIQ/manageiq#15430 and ManageIQ/manageiq#15186
Brings consistency to the automation/provision requests API so that it filters/restricts access to requests in the same way as the generic requests API
@miq-bot add-label bug, api
@miq-bot assign @abellotti