hgext/acl.py
branchstable
changeset 10801 fcfe2e50faab
parent 10263 25e572394f5c
child 10955 470a6ace7574
equal deleted inserted replaced
10800:49c109d037dd 10801:fcfe2e50faab
    61     if not ui.has_section(key):
    61     if not ui.has_section(key):
    62         ui.debug('acl: %s not enabled\n' % key)
    62         ui.debug('acl: %s not enabled\n' % key)
    63         return None
    63         return None
    64 
    64 
    65     pats = [pat for pat, users in ui.configitems(key)
    65     pats = [pat for pat, users in ui.configitems(key)
    66             if user in users.replace(',', ' ').split()]
    66             if users == '*' or user in users.replace(',', ' ').split()]
    67     ui.debug('acl: %s enabled, %d entries for user %s\n' %
    67     ui.debug('acl: %s enabled, %d entries for user %s\n' %
    68              (key, len(pats), user))
    68              (key, len(pats), user))
    69     if pats:
    69     if pats:
    70         return match.match(repo.root, '', pats)
    70         return match.match(repo.root, '', pats)
    71     return match.exact(repo.root, '', [])
    71     return match.exact(repo.root, '', [])