Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix #954

  • Loading branch information...
commit bd17ff5e424ac25c60d197e3ba8cdb45b05a6a13 1 parent f8afd16
@mmerickel mmerickel authored
View
4 pyramid/config/views.py
@@ -257,7 +257,9 @@ def _authdebug_view(context, request):
view_name = getattr(request, 'view_name', None)
if self.authn_policy and self.authz_policy:
- if permission is None:
+ if permission is NO_PERMISSION_REQUIRED:
+ msg = 'Allowed (NO_PERMISSION_REQUIRED)'
+ elif permission is None:
msg = 'Allowed (no permission registered)'
else:
principals = self.authn_policy.effective_principals(
View
3  pyramid/tests/test_config/test_views.py
@@ -2791,7 +2791,8 @@ def test_debug_auth_permission_authpol_overridden(self):
self.assertEqual(len(logger.messages), 1)
self.assertEqual(logger.messages[0],
"debug_authorization of url url (view name "
- "'view_name' against context None): False")
+ "'view_name' against context None): "
+ "Allowed (NO_PERMISSION_REQUIRED)")
def test_secured_view_authn_policy_no_authz_policy(self):
response = DummyResponse()
Please sign in to comment.
Something went wrong with that request. Please try again.