Changeset 9cce15a
- Timestamp:
- Sep 13, 2010 9:51:35 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 5a721ed
- Parents:
- 5c0d244
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/access_to_abac.py
r5c0d244 r9cce15a 45 45 else: 46 46 raise parse_error("Project cannot be decisively mapped: %s" % l) 47 return False48 47 if user == '<same>': 49 48 if gu is not None: … … 51 50 else: 52 51 raise parse_error("User cannot be decisively mapped: %s" % l) 53 return False54 52 if project and user: 55 53 a = 'project_%s_user_%s' % (project, user) … … 60 58 else: 61 59 raise parse_error("No mapping for %s/%s!?" % (gp, gu)) 62 return False63 60 64 61 c = credential(me, a, … … 67 64 if a in to_id: to_id[a].append(c) 68 65 else: to_id[a] = [ c ] 69 return True70 66 else: 71 67 raise parse_error("Badly formatted local mapping: %s" % l) 72 return False73 68 74 69 … … 85 80 if repo in to_id: to_id[repo].append(c) 86 81 else: to_id[repo] = [ c ] 87 return True88 82 else: 89 83 raise parse_error("Badly formatted local mapping: %s" % l) 90 return False 84 85 parse_skel = parse_dragon 86 87 def parse_internal(l, creds, me, to_id, p, gp, gu): pass 91 88 92 89 93 90 class access_opts(OptionParser): 94 mappers = { 'emulab': parse_emulab, 'dragon': parse_dragon } 91 mappers = { 92 'emulab': parse_emulab, 93 'dragon': parse_dragon, 94 'internal': parse_internal, 95 'skel': parse_skel, 96 } 95 97 96 98 @staticmethod … … 120 122 comment_re = re.compile('^\s*#|^$') 121 123 fedid_str = 'fedid:([0-9a-fA-F]{40})' 122 id_str = '[a-zA-Z][\w -]*'124 id_str = '[a-zA-Z][\w_-]*' 123 125 id_any_str = '(%s|<any>)' % id_str 124 126 id_same_str = '(%s|<same>)' % id_str
Note: See TracChangeset
for help on using the changeset viewer.