1
0
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:
Carlos Martín 2011-09-07 16:32:44 +02:00
parent 8abf818f02
commit 0e9ecc5655
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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
}