-
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
Allow descendants of Host model to use belongsto filters in RBAC #14852
Allow descendants of Host model to use belongsto filters in RBAC #14852
Conversation
For example: Nowadays we have one descendant of Host and it is: ManageIQ::Providers::Vmware::InfraManager::HostEsx
@miq-bot add_label blocker |
CI failure is not related to this PR. |
spec/lib/rbac/filterer_spec.rb
Outdated
group.entitlement.set_managed_filters([['/managed/environment/prod']]) | ||
group.save! | ||
|
||
@host_1.tag_with(['/managed/environment/prod'].join(' '), :ns => '*') |
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.
'/managed/environment/prod'].join(' ')
should be '/managed/environment/prod'
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.
I'll open a PR to remove the other unneeded [].join(' ') in the file.
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.
👍 fixed
I'll open a PR to remove the other unneeded [].join(' ') in the file.
thanks !!!
4f3beb9
to
89320b3
Compare
Seen in ManageIQ#14852 It's already a single string, there's no need to wrap it in an array and join the single element with a space.
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.
LGTM once green
Checked commits lpichler/manageiq@30fee49~...89320b3 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
…l_to_use_belongsto_filters Allow descendants of Host model to use belongsto filters in RBAC (cherry picked from commit 4bcba39) https://bugzilla.redhat.com/show_bug.cgi?id=1445075
Fine backport details:
|
https://bugzilla.redhat.com/show_bug.cgi?id=1443929
we have Host model and his descendant is only
ManageIQ::Providers::Vmware::InfraManager::HostEsx
modelbut when input (Host object) to RBAC had its subclass
ManageIQ::Providers::Vmware::InfraManager::HostEsx
then belongs to filters are not used
so in this PR it is allowed aslo for Host's subclasses.
@miq-bot add_label bug, rbac, core
@miq-bot assign @gtanzillo