diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-07-19 02:36:39 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-07-19 02:36:39 +0000 |
| commit | eb3d3b30008c951e875cd807e692cc0b38f2e3fa (patch) | |
| tree | e33ff094de10fc8a1c430c6434a617a77a173659 | |
| parent | 0322b635a03be3d152f62ec52d8ea4c0b9ae5f73 (diff) | |
| download | pyramid-eb3d3b30008c951e875cd807e692cc0b38f2e3fa.tar.gz pyramid-eb3d3b30008c951e875cd807e692cc0b38f2e3fa.tar.bz2 pyramid-eb3d3b30008c951e875cd807e692cc0b38f2e3fa.zip | |
Bug.
| -rw-r--r-- | repoze/bfg/tests/test_security.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_security.py b/repoze/bfg/tests/test_security.py index 832cc8a43..541c2b7f2 100644 --- a/repoze/bfg/tests/test_security.py +++ b/repoze/bfg/tests/test_security.py @@ -157,6 +157,26 @@ class TestACLAuthorizer(unittest.TestCase): result = authorizer.permits('read', *principals) self.assertEqual(result, False) + def test_permits_allow_via_location_parent(self): + context = DummyContext() + context.__parent__ = None + context.__name__ = None + logger = DummyLogger() + from repoze.bfg.security import Allow + ace = (Allow, 'fred', 'read') + acl = [ace] + context.__acl__ = acl + context2 = DummyContext() + context2.__parent__ = context + context2.__name__ = 'myname' + from zope.location import ILocation + from zope.interface import directlyProvides + directlyProvides(ILocation) + authorizer = self._makeOne(context, logger) + principals = ['fred'] + result = authorizer.permits('read', *principals) + self.assertEqual(result, True) + def test_logging_deny_implicit(self): context = DummyContext() logger = DummyLogger() |
