comparison hgext/acl.py @ 3059:5e39ad2c8b52

really treat the right side of acl.{allow,deny} as a list of users the current implementation seems to expect only user per pattern, which contradicts the documentation available at the file beginning.
author Mikhail Sobolev <mss@mawhrin.net>
date Tue, 27 Jun 2006 01:41:07 +0300
parents ae12e5a2c4a3
children f29989e9746e
comparison
equal deleted inserted replaced
3058:713de12d9ce5 3059:5e39ad2c8b52
58 if not self.ui.has_config(key): 58 if not self.ui.has_config(key):
59 self.ui.debug(_('acl: %s not enabled\n') % key) 59 self.ui.debug(_('acl: %s not enabled\n') % key)
60 return None, False 60 return None, False
61 61
62 thisuser = self.getuser() 62 thisuser = self.getuser()
63 pats = [pat for pat, user in self.ui.configitems(key) 63 pats = [pat for pat, users in self.ui.configitems(key)
64 if user == thisuser] 64 if thisuser in users.replace(',', ' ').split()]
65 self.ui.debug(_('acl: %s enabled, %d entries for user %s\n') % 65 self.ui.debug(_('acl: %s enabled, %d entries for user %s\n') %
66 (key, len(pats), thisuser)) 66 (key, len(pats), thisuser))
67 if pats: 67 if pats:
68 match = util.matcher(self.repo.root, names=pats)[1] 68 match = util.matcher(self.repo.root, names=pats)[1]
69 else: 69 else: