Skip to content

Commit

Permalink
Fix toggleprod issue for no-admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
ricofehr committed May 4, 2017
1 parent b636653 commit a611038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ror/app/models/vm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def toggleprod
# ensure that we have still right for change a vm to prod status
if !is_prod
if !user.admin? &&
user.quotaprod > user.vms.select { |v| v.is_prod }.size
user.quotaprod < user.vms.select { |v| v.is_prod }.size
return
end
end
Expand Down

0 comments on commit a611038

Please sign in to comment.