Check quotas against the machine's owner and not the user committing the act
authorQuentin Smith <quentin@mit.edu>
Sat, 2 Feb 2008 08:33:15 +0000 (03:33 -0500)
committerQuentin Smith <quentin@mit.edu>
Sat, 2 Feb 2008 08:33:15 +0000 (03:33 -0500)
svn path=/trunk/web/; revision=266

main.py

diff --git a/main.py b/main.py
index 7e7e23d..a3c84ee 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -146,10 +146,10 @@ def parseCreate(user, fields):
     owner = validation.testOwner(user, fields.getfirst('owner'))
 
     memory = fields.getfirst('memory')
     owner = validation.testOwner(user, fields.getfirst('owner'))
 
     memory = fields.getfirst('memory')
-    memory = validation.validMemory(user, memory, on=True)
+    memory = validation.validMemory(owner, memory, on=True)
     
     disk_size = fields.getfirst('disk')
     
     disk_size = fields.getfirst('disk')
-    disk_size = validation.validDisk(user, disk_size)
+    disk_size = validation.validDisk(owner, disk_size)
 
     vm_type = fields.getfirst('vmtype')
     if vm_type not in ('hvm', 'paravm'):
 
     vm_type = fields.getfirst('vmtype')
     if vm_type not in ('hvm', 'paravm'):