mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-27 03:21:29 +03:00
Fix bug: quota authorization ignored the ACL decision.
This commit is contained in:
parent
8abf818f02
commit
0e9ecc5655
@ -35,7 +35,7 @@ require 'quota'
|
||||
user_id = ARGV.shift
|
||||
|
||||
overall_evalutation = ARGV.pop
|
||||
exit -1 if overall_evalutation == 0
|
||||
exit -1 if overall_evalutation.to_i == 0
|
||||
|
||||
quota = Quota.new
|
||||
|
||||
|
@ -169,7 +169,7 @@ class Quota
|
||||
def authorize(user_id, request)
|
||||
obj, template_or_id, op, owner, pub, acl_eval = request.split(':')
|
||||
|
||||
if acl_eval == 0
|
||||
if acl_eval.to_i == 0
|
||||
return "ACL evaluation denied"
|
||||
end
|
||||
|
||||
@ -204,7 +204,7 @@ class Quota
|
||||
msg << " #{qname.to_s.upcase} quota exceeded "
|
||||
msg << "(Quota: #{limit}, "
|
||||
msg << "Used: #{used}, "
|
||||
msg << "Asked: #{request})."
|
||||
msg << "Requested: #{request})"
|
||||
end
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user