changeset 33188:478cb17cc610

configitems: register the 'acl.sources' config The existing default value is now formally declared. It seems like the whole config should be a list, but this is an adventure for the next changesets.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 30 Jun 2017 03:27:07 +0200
parents 8b109c61bc11
children 2b233065f57a
files hgext/acl.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/acl.py	Fri Jun 30 03:26:57 2017 +0200
+++ b/hgext/acl.py	Fri Jun 30 03:27:07 2017 +0200
@@ -218,6 +218,9 @@
 configitem('acl', 'config',
     default=None,
 )
+configitem('acl', 'sources',
+    default='serve',
+)
 
 def _getusers(ui, group):
 
@@ -289,7 +292,7 @@
         raise error.Abort(_('config error - hook type "%s" cannot stop '
                            'incoming changesets nor commits') % hooktype)
     if (hooktype == 'pretxnchangegroup' and
-        source not in ui.config('acl', 'sources', 'serve').split()):
+        source not in ui.config('acl', 'sources').split()):
         ui.debug('acl: changes have source "%s" - skipping\n' % source)
         return