2 from _acl import READ, WRITE, INSERT, LOOKUP, DELETE, LOCK, ADMINISTER, \
3 USR0, USR1, USR2, USR3, USR4, USR5, USR6, USR7
4 from _acl import getCallerAccess
32 _char2bit = dict(_charBitAssoc)
36 """Canonicalizes string rights to bitmask"""
37 if s in _canonical: s = _canonical[s]
38 return _parseRights(s)
41 """Takes a bitmask and returns a rwlidka string"""
43 for char,mask in _charBitAssoc:
44 if r & mask == mask: s += char
48 """Parses a rwlid... rights tring to bitmask"""
58 lines = inp.split("\n")
59 npos = int(lines[0].split(" ")[0])
74 def __init__(self, pos, neg):
77 Dictionary of usernames to positive ACL bitmasks
79 Dictionary of usernames to negative ACL bitmasks
84 def retrieve(dir, follow=1):
85 """Retrieve the ACL for an AFS directory"""
86 pos, neg = _parseAcl(_acl.getAcl(dir, follow))