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
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user