Commits

Elliot Peele committed 4c54bdb Draft

add missing file

Comments (0)

Files changed (1)

authztest/auth.py

+import logging
+
+from pyramid.authorization import ACLAuthorizationPolicy
+
+log = logging.getLogger('authztest.auth')
+
+class AuthorizationPolicy(ACLAuthorizationPolicy):
+    def permits(self, context, principals, permission):
+        log.debug('authz policy: permits called')
+        ret = ACLAuthorizationPolicy.permits(self, context, principals,
+            permission)
+        return ret
+
+    def principals_allowed_by_permission(self, context, permission):
+        log.debug('authz policy: allowed_by_permission called')
+        ret = ACLAuthorizationPolicy.principals_allowed_by_permission(self,
+            context, permission)
+        return ret