Permalink
Browse files

fix #954

  • Loading branch information...
mmerickel committed Apr 3, 2013
1 parent f8afd16 commit bd17ff5e424ac25c60d197e3ba8cdb45b05a6a13
Showing with 5 additions and 2 deletions.
  1. +3 −1 pyramid/config/views.py
  2. +2 −1 pyramid/tests/test_config/test_views.py
View
@@ -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(
@@ -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()

0 comments on commit bd17ff5

Please sign in to comment.