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:
parent
f75fd60284
commit
261a347d62
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user