1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-27 03:21:29 +03:00

feature #788: Return all the quotas if the user is not specified

This commit is contained in:
Daniel Molina 2011-08-31 14:01:52 +02:00
parent f75fd60284
commit 261a347d62

View File

@ -100,12 +100,16 @@ class Quota
end end
# Gets user limits # Gets user limits
def get(uid) def get(uid=nil)
if uid
limit=@table.filter(:uid => uid).first limit=@table.filter(:uid => uid).first
if limit if limit
limit limit
else
@conf[:defaults]
end
else else
@conf[:defaults] @table.all
end end
end end