From: Eric Price Date: Fri, 19 Oct 2007 02:58:34 +0000 (-0400) Subject: Fix to admin X-Git-Tag: sipb-xen-www/1~51 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/f3c1b256ad0f930d2f7fc623ad538692a3829979 Fix to admin svn path=/trunk/web/; revision=203 --- diff --git a/templates/main.py b/templates/main.py index a25257f..915b5eb 100755 --- a/templates/main.py +++ b/templates/main.py @@ -131,7 +131,9 @@ def haveAccess(user, machine): 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) @@ -596,9 +598,9 @@ def testAdmin(user, admin, 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')