summaryrefslogtreecommitdiff
path: root/repoze/bfg/security.py
diff options
context:
space:
mode:
Diffstat (limited to 'repoze/bfg/security.py')
-rw-r--r--repoze/bfg/security.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/repoze/bfg/security.py b/repoze/bfg/security.py
index 466c33da3..e0873a0ad 100644
--- a/repoze/bfg/security.py
+++ b/repoze/bfg/security.py
@@ -2,10 +2,21 @@ from zope.component import getSiteManager
from zope.component import providedBy
from zope.component import queryUtility
+from zope.deprecation import deprecated
+
from repoze.bfg.interfaces import IAuthenticationPolicy
from repoze.bfg.interfaces import IAuthorizationPolicy
from repoze.bfg.interfaces import ISecuredView
+# b/c import
+from repoze.bfg.exceptions import Forbidden as Unauthorized
+
+deprecated('Unauthorized',
+ "('from repoze.bfg.security import Unauthorized' was "
+ "deprecated as of repoze.bfg 1.1; instead use 'from "
+ "repoze.bfg.exceptions import Forbidden')",
+ )
+
Everyone = 'system.Everyone'
Authenticated = 'system.Authenticated'
Allow = 'Allow'
@@ -229,6 +240,3 @@ class ACLAllowed(ACLPermitsResult):
as the ``msg`` attribute."""
boolval = 1
-class Unauthorized(Exception):
- pass
-