diff options
| -rw-r--r-- | repoze/bfg/security.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/repoze/bfg/security.py b/repoze/bfg/security.py index 2b1d3e0de..5ad3174da 100644 --- a/repoze/bfg/security.py +++ b/repoze/bfg/security.py @@ -68,10 +68,10 @@ class ACLAuthorizer(object): self.context = context def permits(self, permission, *principals): - acl = getattr(self.context, '__acl__', None) - if acl is None: - raise NoAuthorizationInformation('%s item has no __acl__' % - self.context) + try: + acl = self.context.__acl__ + except AttributeError: + raise NoAuthorizationInformation for ace in acl: ace_action, ace_principal, ace_permissions = ace |
