-
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
Ensure a users own tasks are the only ones returned when the users role has View/My Tasks #18311
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,10 @@ def tenant_admin_user? | |
allows?(:identifier => MiqProductFeature::TENANT_ADMIN_FEATURE) | ||
end | ||
|
||
def report_only_my_user_tasks? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Following the convention of the above methods, how about naming this one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gtanzillo Thank you for the feedback. I named this method Would you be OK if I renamed this method from |
||
!allows?(:identifier => MiqProductFeature::REPORT_ALL_TASKS) && allows?(:identifier => MiqProductFeature::REPORT_MY_TASKS) | ||
end | ||
|
||
def report_admin_user? | ||
allows?(:identifier => MiqProductFeature::REPORT_ADMIN_FEATURE) | ||
end | ||
|
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.
Following the existing convention I think these two should be named with
*_FEATURE
.Also, the
REPORT
prefix is misleading because these features are not reporting feature, afaik. Perhaps you can name themMY_TASKS_FEATURE
andALL_TASKS_FEATURE
?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.
👍 Thank you. Will do