Changeset 408 for trunk/packages/sipb-xen-www/code
- Timestamp:
- Apr 6, 2008, 8:08:04 PM (17 years ago)
- Location:
- trunk/packages/sipb-xen-www/code
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-www/code/getafsgroups.py
r246 r408 2 2 import pprint 3 3 import subprocess 4 from webcommon import InvalidInput 4 5 5 6 # import ldap … … 35 36 return [line.strip() for line in p.stdout.readlines()[1:]] 36 37 38 def getLockerPath(locker): 39 if '/' in locker or locker in ['.', '..']: 40 raise InvalidInput('owner', locker, 'Locker name is invalid.') 41 return '/mit/' + locker 42 37 43 def checkAfsGroup(user, group, cell): 38 44 """ … … 42 48 43 49 def getCell(locker): 44 p = subprocess.Popen(["fs", "whichcell", "/mit/" + locker],50 p = subprocess.Popen(["fs", "whichcell", getLockerPath(locker)], 45 51 stdout=subprocess.PIPE, stderr=subprocess.PIPE) 46 52 if p.wait(): … … 49 55 50 56 def getLockerAcl(locker): 51 p = subprocess.Popen(["fs", "listacl", "/mit/" + locker],57 p = subprocess.Popen(["fs", "listacl", getLockerPath(locker)], 52 58 stdout=subprocess.PIPE, stderr=subprocess.PIPE) 53 59 if p.wait(): … … 59 65 if fields[0] == 'Negative': 60 66 break 61 if ' rlidwka' in fields[1]:67 if 'a' in fields[1]: 62 68 values.append(fields[0]) 63 69 return values … … 80 86 checkAfsGroup(user, entry, cell)): 81 87 return False 82 return "You don't have admin bits on /mit/" + locker88 return "You don't have admin bits on " + getLockerPath(locker) 83 89 84 90 -
trunk/packages/sipb-xen-www/code/main.py
r407 r408 449 449 group.""", 450 450 quotas=""" 451 Quotas are determined on a per-locker basis. Each quotamay have a451 Quotas are determined on a per-locker basis. Each locker may have a 452 452 maximum of 512 megabytes of active ram, 50 gigabytes of disk, and 4 453 453 active machines.""",
Note: See TracChangeset
for help on using the changeset viewer.