Changeset 9cce15a


Ignore:
Timestamp:
Sep 13, 2010 9:51:35 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
5a721ed
Parents:
5c0d244
Message:

small changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/access_to_abac.py

    r5c0d244 r9cce15a  
    4545            else:
    4646                raise parse_error("Project cannot be decisively mapped: %s" % l)
    47                 return False
    4847        if user == '<same>':
    4948            if gu is not None:
     
    5150            else:
    5251                raise parse_error("User cannot be decisively mapped: %s" % l)
    53                 return False
    5452        if project and user:
    5553            a = 'project_%s_user_%s' % (project, user)
     
    6058        else:
    6159            raise parse_error("No mapping for %s/%s!?" % (gp, gu))
    62             return False
    6360
    6461        c = credential(me, a,
     
    6764        if a in to_id: to_id[a].append(c)
    6865        else: to_id[a] = [ c ]
    69         return True
    7066    else:
    7167        raise parse_error("Badly formatted local mapping: %s" % l)
    72         return False
    7368
    7469
     
    8580        if repo in to_id: to_id[repo].append(c)
    8681        else: to_id[repo] = [ c ]
    87         return True
    8882    else:
    8983        raise parse_error("Badly formatted local mapping: %s" % l)
    90         return False
     84
     85parse_skel = parse_dragon
     86
     87def parse_internal(l, creds, me, to_id, p, gp, gu): pass
    9188
    9289
    9390class 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            }
    9597
    9698    @staticmethod
     
    120122comment_re = re.compile('^\s*#|^$')
    121123fedid_str = 'fedid:([0-9a-fA-F]{40})'
    122 id_str = '[a-zA-Z][\w-]*'
     124id_str = '[a-zA-Z][\w_-]*'
    123125id_any_str = '(%s|<any>)' % id_str
    124126id_same_str = '(%s|<same>)' % id_str
Note: See TracChangeset for help on using the changeset viewer.