-
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
Remove Request taggable and prevent tag filtering #17656
Remove Request taggable and prevent tag filtering #17656
Conversation
Thank you @LorkScorguar for reporting this issue and providing the detailed information needed to fix it. |
Added fine/yes and gap/yes since #17466 was backported to both. |
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 good 👍
MiqRequest was changed to allow ownership for self service and limited self-service users in ManageIQ ManageIQ#17208, BZ #1545395 This caused a problem if you had tag filters assign to a user's group undefined method `find_tags_by_grouping'. This was fixed in ManageIQ ManageIQ#17466, BZ #1576129, and shipped with: Fine: BZ #1583711 Gaprindindashvili: BZ #1583710 Unfortunately, this second fix to add taggable caused a new bug: users in groups having tag filters could not see their own requests. This commit changes MiqRequest to no longer be taggable, since it's not even taggable in the UI and instead, we add MiqRequest to a list of models that are RBAC'able but not taggable so we don't try to filter MiqRequest based on a user's group tag filters. Credit goes to github user LorkScorguar who reported this issue and provided lots of diagnostics to help us fix this properly. To test this, simply assign managed filters to a user's group, such as /managed/environments/production, create a request for that user and try to see that user's request. They couldn't see it if they received the intermediate fix, ManageIQ#17466, or if they didn't receive that fix, they'd receive the `find_tags_by_grouping` error shown above. For gaprindashvili and fine: Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1596738 For hammer: Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1576129
36a25f2
to
f8c0553
Compare
Checked commit jrafanie@f8c0553 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
…nd_prevent_tag_filtering_on_it Remove Request taggable and prevent tag filtering (cherry picked from commit b856925) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1597321
Gaprindashvili backport details:
|
MiqRequest was changed to allow ownership for self service and limited
self-service users in ManageIQ #17208, BZ #1545395
This caused a problem if you had tag filters assign to a user's group:
undefined method
find_tags_by_grouping'`This was fixed in ManageIQ #17466, BZ #1576129, and shipped with:
Fine: BZ #1583711
Gaprindindashvili: BZ #1583710
Unfortunately, this second fix to add taggable caused a new bug: users in
groups having tag filters could not see their own requests.
This commit changes MiqRequest to no longer be taggable, since it's not
even taggable in the UI and instead, we add MiqRequest to a list of
models that are RBAC'able but not taggable so we don't try to filter
MiqRequest based on a user's group tag filters.
Credit goes to github user LorkScorguar who reported this issue and
provided lots of diagnostics to help us fix this properly.
To test this, simply assign managed filters to a user's group, such as
/managed/environments/production, create a request for that user and
try to see that user's request. They couldn't see it if they received
the intermediate fix, #17466, or if they didn't receive that fix, they'd
receive the
find_tags_by_grouping
error shown above.For gaprindashvili and fine:
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1596738
For hammer:
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1576129