-
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
Join RBAC check for MiqUserRole, User and MiqGroup to one if branch #14901
Join RBAC check for MiqUserRole, User and MiqGroup to one if branch #14901
Conversation
06b3f17
to
e9b79de
Compare
Checked commits lpichler/manageiq@998f45c~...e9b79de with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
lib/rbac/filterer.rb
Outdated
elsif klass == MiqGroup && miq_group.try!(:self_service?) | ||
# Self Service users searching for groups only see their group | ||
scope.where(:id => miq_group.id) | ||
elsif [User, MiqGroup].include?(klass) && (miq_group || user).try!(:self_service?) |
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.
Interestingly, we can do this. Since the miq_group getting here should be always equal to user.current_group (if both supplied). And the self_service? method get's routed to the current_group.
Net result is the same. Even though, I keep scratching my chin at this. :)
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
Hehe. Was gonna merge this also :-D and the button was gone! |
@miq-bot add_label fine/yes |
…roup_to_one_if_branch Join RBAC check for MiqUserRole, User and MiqGroup to one if branch (cherry picked from commit b8adc25) https://bugzilla.redhat.com/show_bug.cgi?id=1447372
Fine backport details:
|
thanks @lpichler - sorry, late to the party |
@miq-bot add_label bug |
@miq-bot add_label euwe/yes |
…roup_to_one_if_branch Join RBAC check for MiqUserRole, User and MiqGroup to one if branch (cherry picked from commit b8adc25) https://bugzilla.redhat.com/show_bug.cgi?id=1460979
Euwe backport details:
|
RBAC check for MiqUserRole, User, MiqGroup models - these checks are related so
I think they should be together. This could be helpful to implement the other condition for MiqGroup and Group described in #14903
Depends on(reason of WIP):
#14898
Continue in #14903 (blocker)
Starting in commit Join User and Group rbac check to one if branch
@miq-bot add_label wip, fine/yes, refactoring
@miq-bot assign @gtanzillo
cc @kbrock