mercurial/wireproto.py
changeset 36801 66de4555cefd
parent 36800 0b18604db95e
child 36835 5bc7ff103081
--- a/mercurial/wireproto.py	Wed Mar 07 16:02:24 2018 -0800
+++ b/mercurial/wireproto.py	Wed Mar 07 16:18:52 2018 -0800
@@ -731,13 +731,10 @@
                 vals[unescapearg(n)] = unescapearg(v)
         func, spec = commands[op]
 
-        # If the protocol supports permissions checking, perform that
-        # checking on each batched command.
-        # TODO formalize permission checking as part of protocol interface.
-        if util.safehasattr(proto, 'checkperm'):
-            perm = commands[op].permission
-            assert perm in ('push', 'pull')
-            proto.checkperm(perm)
+        # Validate that client has permissions to perform this command.
+        perm = commands[op].permission
+        assert perm in ('push', 'pull')
+        proto.checkperm(perm)
 
         if spec:
             keys = spec.split()