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
# Gets user limits
def get(uid)
def get(uid=nil)
if uid
limit=@table.filter(:uid => uid).first
if limit
limit
if limit
limit
else
@conf[:defaults]
end
else
@conf[:defaults]
@table.all
end
end