For now, revert r2093-2095, which were committed by accident; I'm not
[invirt/packages/invirt-web.git] / code / validation.py
index dd3278b..5f2a3ff 100644 (file)
@@ -7,7 +7,7 @@ import string
 import dns.resolver
 from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall
 from invirt.config import structs as config
 import dns.resolver
 from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall
 from invirt.config import structs as config
-from invirt.common import InvalidInput
+from invirt.common import InvalidInput, CodeError
 
 MAX_MEMORY_TOTAL = 512
 MAX_MEMORY_SINGLE = 512
 
 MAX_MEMORY_TOTAL = 512
 MAX_MEMORY_SINGLE = 512
@@ -241,8 +241,6 @@ def testOwner(user, owner, machine=None):
 
     If machine is None, this is the owner of a new machine.
     """
 
     If machine is None, this is the owner of a new machine.
     """
-    if owner == user:
-        return owner
     if machine is not None and owner in (machine.owner, None):
         return machine.owner
     if owner is None:
     if machine is not None and owner in (machine.owner, None):
         return machine.owner
     if owner is None: