mercurial/hgweb/hgweb_mod.py
branchstable
changeset 36755 ff4bc0ab6740
parent 36753 742ce6fbc109
child 36756 2ecb0fc535b1
--- a/mercurial/hgweb/hgweb_mod.py	Tue Feb 20 18:54:27 2018 -0800
+++ b/mercurial/hgweb/hgweb_mod.py	Tue Feb 20 18:55:58 2018 -0800
@@ -360,8 +360,10 @@
             try:
                 if query:
                     raise ErrorResponse(HTTP_NOT_FOUND)
+
+                req.checkperm = lambda op: self.check_perm(rctx, req, op)
                 if cmd in perms:
-                    self.check_perm(rctx, req, perms[cmd])
+                    req.checkperm(perms[cmd])
                 return protocol.call(rctx.repo, req, cmd)
             except ErrorResponse as inst:
                 # A client that sends unbundle without 100-continue will