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

Show VM transform button only if permitted #2959

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Show VM transform button only if permitted
Show VM transform button for mass transforms only if vm_transform_mass
permission is set in the permission store. By default, it is visible in
ManageIQ, that uses Null permission store, and hidden in CFME, if
vm_transform_mass is not set explicitly in YAML permission store.
smelamud committed Dec 11, 2017
commit 3f075544fd817b18eac8cf5b97695a66f99a15ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class ApplicationHelper::Button::MassTransformVmButton < ApplicationHelper::Button::Basic
def visible?
true
store = Vmdb::PermissionStores.instance
store.can?('vm_transform_mass')
end

def disabled?