Skip to content

Commit

Permalink
Add example find_checked_items_with_rbac call
Browse files Browse the repository at this point in the history
  • Loading branch information
PanSpagetka committed Mar 22, 2017
1 parent 025792b commit 457b085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller/ci_processing.rb
Expand Up @@ -208,7 +208,7 @@ def ownership_update
# Retire 1 or more VMs
def retirevms
assert_privileges(params[:pressed])
vms = find_checked_items
vms = find_checked_items_with_rbac(VmOrTemplate)
if !%w(orchestration_stack service).include?(request.parameters["controller"]) && !%w(orchestration_stacks).include?(params[:display]) &&
VmOrTemplate.find(vms).any? { |vm| !vm.supports_retire? }
add_flash(_("Set Retirement Date does not apply to selected %{model}") %
Expand Down

0 comments on commit 457b085

Please sign in to comment.