return True
if user.username in (machine.administrator, machine.owner):
return True
- if getafsgroups.checkAfsGroup(user, machine.administrator, 'athena.mit.edu'): #XXX Cell?
+ if getafsgroups.checkAfsGroup(user.username, machine.administrator, 'athena.mit.edu'): #XXX Cell?
+ return True
+ if getafsgroups.checkLockerOwner(user.username, machine.owner):
return True
return owns(user, machine)
return None
if admin == user.username:
return admin
- if getafsgroups.checkAfsGroup(user, admin, 'athena.mit.edu'):
+ if getafsgroups.checkAfsGroup(user.username, admin, 'athena.mit.edu'):
return admin
- if getafsgroups.checkAfsGroup(user, 'system:'+admin, 'athena.mit.edu'):
+ if getafsgroups.checkAfsGroup(user.username, 'system:'+admin, 'athena.mit.edu'):
return 'system:'+admin
raise InvalidInput('admin', admin,
'You must control the group you move it to')