Changeset 867 for trunk/packages/sipb-xen-www/code/validation.py
- Timestamp:
- Aug 4, 2008, 11:20:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-www/code/validation.py
r865 r867 126 126 def haveAccess(user, state, machine): 127 127 """Return whether a user has administrative access to a machine""" 128 return state. overlordor user in cache_acls.accessList(machine)128 return state.isadmin or user in cache_acls.accessList(machine) 129 129 130 130 def owns(user, machine): … … 158 158 "Minimum %s MiB" % MIN_MEMORY_SINGLE) 159 159 max_val = maxMemory(owner, g, machine, on) 160 if not g. overlordand memory > max_val:160 if not g.isadmin and memory > max_val: 161 161 raise InvalidInput('memory', memory, 162 162 'Maximum %s MiB for %s' % (max_val, owner)) … … 167 167 try: 168 168 disk = float(disk) 169 if not g. overlordand disk > maxDisk(owner, machine):169 if not g.isadmin and disk > maxDisk(owner, machine): 170 170 raise InvalidInput('disk', disk, 171 171 "Maximum %s G" % maxDisk(owner, machine))
Note: See TracChangeset
for help on using the changeset viewer.