mercurial/hgweb/hgweb_mod.py
changeset 36801 66de4555cefd
parent 36800 0b18604db95e
child 36802 7fc80c982656
--- a/mercurial/hgweb/hgweb_mod.py	Wed Mar 07 16:02:24 2018 -0800
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Mar 07 16:18:52 2018 -0800
@@ -350,18 +350,15 @@
 
         # Route it to a wire protocol handler if it looks like a wire protocol
         # request.
-        protohandler = wireprotoserver.parsehttprequest(rctx.repo, req, query)
+        protohandler = wireprotoserver.parsehttprequest(rctx, req, query,
+                                                        self.check_perm)
 
         if protohandler:
             try:
                 if query:
                     raise ErrorResponse(HTTP_NOT_FOUND)
 
-                # TODO fold this into parsehttprequest
-                checkperm = lambda op: self.check_perm(rctx, req, op)
-                protohandler['proto'].checkperm = checkperm
-
-                return protohandler['dispatch'](checkperm)
+                return protohandler['dispatch']()
             except ErrorResponse as inst:
                 return protohandler['handleerror'](inst)