summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-05-27 23:46:20 +0000
committerChris McDonough <chrism@agendaless.com>2009-05-27 23:46:20 +0000
commitf4108da64a4f24d5710c7e03389a9316cf62d342 (patch)
tree12b22b9848fd2e68362d85b10a77b20d3351f1cf
parent54a0cadf6006b07e4c3cd4ffdcb1e0e6fa53b600 (diff)
downloadpyramid-f4108da64a4f24d5710c7e03389a9316cf62d342.tar.gz
pyramid-f4108da64a4f24d5710c7e03389a9316cf62d342.tar.bz2
pyramid-f4108da64a4f24d5710c7e03389a9316cf62d342.zip
- Added deprecations for imports of ``ACLSecurityPolicy``,
``InheritingACLSecurityPolicy``, ``RemoteUserACLSecurityPolicy``, ``RemoteUserInheritingACLSecurityPolicy``, ``WhoACLSecurityPolicy``, and ``WhoInheritingACLSecurityPolicy`` from the ``repoze.bfg.security`` module; for the meantime (for backwards compatibility purposes) these live in the ``repoze.bfg.secpols`` module. Note however, that the entire concept of a "security policy" is deprecated in BFG in favor of separate authentication and authorization policies, so any use of a security policy will generate additional deprecation warnings even if you do start using ``repoze.bfg.secpols``. ``repoze.bfg.secpols`` will disappear in a future release of ``repoze.bfg``.
-rw-r--r--CHANGES.txt16
-rw-r--r--repoze/bfg/security.py16
2 files changed, 32 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 0c792cfcf..0a476b3f0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,22 @@ Documentation
step-by-step how to create a traversal-based ZODB application with
authentication.
+Deprecation Additions
+---------------------
+
+- Added deprecations for imports of ``ACLSecurityPolicy``,
+ ``InheritingACLSecurityPolicy``, ``RemoteUserACLSecurityPolicy``,
+ ``RemoteUserInheritingACLSecurityPolicy``, ``WhoACLSecurityPolicy``,
+ and ``WhoInheritingACLSecurityPolicy`` from the
+ ``repoze.bfg.security`` module; for the meantime (for backwards
+ compatibility purposes) these live in the ``repoze.bfg.secpols``
+ module. Note however, that the entire concept of a "security
+ policy" is deprecated in BFG in favor of separate authentication and
+ authorization policies, so any use of a security policy will
+ generate additional deprecation warnings even if you do start using
+ ``repoze.bfg.secpols``. ``repoze.bfg.secpols`` will disappear in a
+ future release of ``repoze.bfg``.
+
Deprecated Alias Removals
-------------------------
diff --git a/repoze/bfg/security.py b/repoze/bfg/security.py
index 5f5252ff3..f72f6eb7d 100644
--- a/repoze/bfg/security.py
+++ b/repoze/bfg/security.py
@@ -2,6 +2,8 @@ import warnings
from zope.component import queryMultiAdapter
from zope.component import queryUtility
+from zope.deprecation import deprecated
+
from zope.interface import implements
from repoze.bfg.interfaces import IAuthenticationPolicy
@@ -287,3 +289,17 @@ from repoze.bfg.secpols import WhoACLSecurityPolicy
from repoze.bfg.secpols import WhoInheritingACLSecurityPolicy
# /BBB imports
+for name in ('ACLSecurityPolicy',
+ 'InheritingACLSecurityPolicy',
+ 'RemoteUserACLSecurityPolicy',
+ 'RemoteUserInheritingACLSecurityPolicy',
+ 'WhoACLSecurityPolicy',
+ 'WhoInheritingACLSecurityPolicy'):
+ deprecated(name,
+ ('repoze.bfg.security.%s should be imported from '
+ 'repoze.bfg.secpols.%s as of BFG 0.9. Please consider '
+ 'disusing any security policy in favor of separate '
+ 'authorization and authentication policies; security '
+ 'policies themselves are deprecated as of BFG 0.9; see the '
+ 'Security chapter of the BFG docs for the new spellings.'%
+ (name, name)))