Skip to content
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

Conversation

lpichler
Copy link
Contributor

https://bugzilla.redhat.com/show_bug.cgi?id=1443929

we have Host model and his descendant is only ManageIQ::Providers::Vmware::InfraManager::HostEsx model

but 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

For example:
Nowadays we have  one descendant of Host
and it is: ManageIQ::Providers::Vmware::InfraManager::HostEsx
@lpichler
Copy link
Contributor Author

@miq-bot add_label blocker

@lpichler
Copy link
Contributor Author

CI failure is not related to this PR.

@lpichler lpichler closed this Apr 24, 2017
@lpichler lpichler reopened this Apr 24, 2017
group.entitlement.set_managed_filters([['/managed/environment/prod']])
group.save!

@host_1.tag_with(['/managed/environment/prod'].join(' '), :ns => '*')
Copy link
Member

@jrafanie jrafanie Apr 24, 2017

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'

Copy link
Member

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.

Copy link
Contributor Author

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 !!!

@lpichler lpichler force-pushed the allow_descendats_of_host_model_to_use_belongsto_filters branch from 4f3beb9 to 89320b3 Compare April 24, 2017 17:44
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Apr 24, 2017
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.
Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once green

@miq-bot
Copy link
Member

miq-bot commented Apr 24, 2017

Checked commits lpichler/manageiq@30fee49~...89320b3 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. ⭐

@jrafanie jrafanie mentioned this pull request Apr 24, 2017
@jrafanie jrafanie merged commit 4bcba39 into ManageIQ:master Apr 24, 2017
@jrafanie jrafanie added this to the Sprint 59 Ending Apr 24, 2017 milestone Apr 24, 2017
simaishi pushed a commit that referenced this pull request Apr 24, 2017
…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
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit f33b7ccbfb026212b04301a10a989d1c0434351f
Author: Joe Rafaniello <[email protected]>
Date:   Mon Apr 24 14:24:26 2017 -0400

    Merge pull request #14852 from lpichler/allow_descendats_of_host_model_to_use_belongsto_filters
    
    Allow descendants of Host model to use belongsto filters in RBAC
    (cherry picked from commit 4bcba39cd30bb18f1e82bab254bc01618eedcb24)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1445075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants