projects
/
invirt/packages/invirt-web.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Now ignore negative rights, rather than treat them as positive.
[invirt/packages/invirt-web.git]
/
templates
/
validation.py
diff --git
a/templates/validation.py
b/templates/validation.py
index
4165aa9
..
ccb4fef
100644
(file)
--- a/
templates/validation.py
+++ b/
templates/validation.py
@@
-75,7
+75,7
@@
def haveAccess(user, machine):
if getafsgroups.checkAfsGroup(user, machine.administrator,
'athena.mit.edu'): #XXX Cell?
return True
if getafsgroups.checkAfsGroup(user, machine.administrator,
'athena.mit.edu'): #XXX Cell?
return True
- if getafsgroups.checkLockerOwner(user, machine.owner):
+ if not getafsgroups.notLockerOwner(user, machine.owner):
return True
return owns(user, machine)
return True
return owns(user, machine)
@@
-83,7
+83,7
@@
def owns(user, machine):
"""Return whether a user owns a machine"""
if user == 'moo':
return True
"""Return whether a user owns a machine"""
if user == 'moo':
return True
- return getafsgroups.checkLockerOwner(user, machine.owner)
+ return not getafsgroups.notLockerOwner(user, machine.owner)
def validMachineName(name):
"""Check that name is valid for a machine name"""
def validMachineName(name):
"""Check that name is valid for a machine name"""
@@
-168,7
+168,7
@@
def testOwner(user, owner, machine=None):
return owner
if owner is None:
raise InvalidInput('owner', owner, "Owner must be specified")
return owner
if owner is None:
raise InvalidInput('owner', owner, "Owner must be specified")
- value = getafsgroups.checkLockerOwner(user, owner, verbose=True)
+ value = getafsgroups.notLockerOwner(user, owner)
if not value:
return owner
raise InvalidInput('owner', owner, value)
if not value:
return owner
raise InvalidInput('owner', owner, value)