Mercurial > public > mercurial-scm > evolve
diff hgext/evolve.py @ 869:e9eeef0d07ec
exchange: enforce permission on new wireprotocol command
hgweb needs an explicit declaration of the permission level of each commands.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 06 Mar 2014 12:15:04 -0800 |
parents | 3ec90de03562 |
children | 1a23c7c52a43 |
line wrap: on
line diff
--- a/hgext/evolve.py Wed Mar 05 19:08:58 2014 -0800 +++ b/hgext/evolve.py Thu Mar 06 12:15:04 2014 -0800 @@ -64,6 +64,7 @@ from mercurial.node import nullid from mercurial import wireproto from mercurial import localrepo +from mercurial.hgweb import hgweb_mod _pack = struct.pack @@ -2448,6 +2449,9 @@ @eh.extsetup def _installwireprotocol(ui): localrepo.MODERNCAPS.add('_evoext_pullobsmarkers_0') + hgweb_mod.perms['evoext_pushobsmarkers_0'] = 'push' + hgweb_mod.perms['evoext_pullobsmarkers_0'] = 'pull' + hgweb_mod.perms['evoext_obshash'] = 'pull' wireproto.commands['evoext_pushobsmarkers_0'] = (srv_pushobsmarkers, '') wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*') wireproto.commands['evoext_obshash'] = (srv_obshash, 'nodes')