From: Eric Price Date: Wed, 14 Nov 2007 01:18:32 +0000 (-0500) Subject: Revert to old list method until we start updating the cache. X-Git-Tag: sipb-xen-www/1~32 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/10e4a20f31223709b58e75ae75e585cf3050bb0d Revert to old list method until we start updating the cache. Fix a bug in getafsgroups. svn path=/trunk/web/; revision=246 --- diff --git a/getafsgroups.py b/getafsgroups.py index 2de20bc..899de81 100644 --- a/getafsgroups.py +++ b/getafsgroups.py @@ -76,8 +76,8 @@ def notLockerOwner(user, locker): return str(e) for entry in values: - if entry[0] == user or (entry[0][0:6] == "system" and - checkAfsGroup(user, entry[0], cell)): + if entry == user or (entry[0:6] == "system" and + checkAfsGroup(user, entry, cell)): return False return "You don't have admin bits on /mit/" + locker diff --git a/main.py b/main.py index 29b410e..e8d199d 100755 --- a/main.py +++ b/main.py @@ -184,8 +184,12 @@ def create(user, fields): def getListDict(user): - machines = [m for m in Machine.select() - if validation.haveAccess(user, m)] + machines = [m for m in Machine.select() + if validation.haveAccess(user, m)] + #if user == 'moo': + # machines = Machine.select() + #else: + # machines = Machine.query().join('users').filter_by(user=user).all() checkpoint.checkpoint('Got my machines') on = {} has_vnc = {}