Mercurial > public > mercurial-scm > hg
diff hgext/acl.py @ 15207:0f7f9f06c759
acl: more descriptive error messages
author | Elifarley Callado Coelho Cruz |
---|---|
date | Thu, 06 Oct 2011 19:45:26 -0300 |
parents | dce09f82f619 |
children | 0b463f52b948 |
line wrap: on
line diff
--- a/hgext/acl.py Thu Oct 06 11:10:06 2011 +0200 +++ b/hgext/acl.py Thu Oct 06 19:45:26 2011 -0300 @@ -216,6 +216,8 @@ if user is None: user = getpass.getuser() + ui.debug('acl: checking access for user "%s"\n' % user) + cfg = ui.config('acl', 'config') if cfg: ui.readconfig(cfg, sections = ['acl.groups', 'acl.allow.branches', @@ -242,9 +244,9 @@ for f in ctx.files(): if deny and deny(f): - ui.debug('acl: user %s denied on %s\n' % (user, f)) - raise util.Abort(_('acl: access denied for changeset %s') % ctx) + raise util.Abort(_('acl: user "%s" denied on "%s"' + ' (changeset "%s")') % (user, f, ctx)) if allow and not allow(f): - ui.debug('acl: user %s not allowed on %s\n' % (user, f)) - raise util.Abort(_('acl: access denied for changeset %s') % ctx) - ui.debug('acl: allowing changeset %s\n' % ctx) + raise util.Abort(_('acl: user "%s" not allowed on "%s"' + ' (changeset "%s")') % (user, f, ctx)) + ui.debug('acl: path access granted: "%s"\n' % ctx)