[Zope3-checkins] SVN: Zope3/trunk/ Deprecated `pluggableauth`
package. Made sure that the tests do not raise
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Dec 7 20:33:07 EST 2004
Log message for revision 28583:
Deprecated `pluggableauth` package. Made sure that the tests do not raise
Deprecation Warning errors.
Changed:
U Zope3/trunk/doc/CHANGES.txt
U Zope3/trunk/doc/TODO.txt
U Zope3/trunk/src/zope/app/pluggableauth/__init__.py
U Zope3/trunk/src/zope/app/pluggableauth/browser/configure.zcml
U Zope3/trunk/src/zope/app/pluggableauth/tests/authsetup.py
U Zope3/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py
-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt 2004-12-08 00:46:02 UTC (rev 28582)
+++ Zope3/trunk/doc/CHANGES.txt 2004-12-08 01:33:06 UTC (rev 28583)
@@ -149,6 +149,9 @@
Restructuring
+ - The `pluggableauth` package has been deprecated. The `pas` module
+ provides a much more modular approach with many more capabilities.
+
- Removed special `RoleRegistration` now that we have events for
notification. Also, renamed `PersistentRole` to `LocalRole`.
Modified: Zope3/trunk/doc/TODO.txt
===================================================================
--- Zope3/trunk/doc/TODO.txt 2004-12-08 00:46:02 UTC (rev 28582)
+++ Zope3/trunk/doc/TODO.txt 2004-12-08 01:33:06 UTC (rev 28583)
@@ -46,10 +46,6 @@
o Run book sources against source tree (Stephan and Phillip)
-- Make sure that all deprecation warnings are raised
-
- o old pluggable authentication service should be deprecated
-
- Create a new ZODB generation for the following objects:
- PersistentRole --> LocalRole
@@ -58,6 +54,7 @@
- Registration (using paths) --> Registration (using objects)
+ - PluggableAuthenticationService --> PAS
Bug Fixes
---------
Modified: Zope3/trunk/src/zope/app/pluggableauth/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/pluggableauth/__init__.py 2004-12-08 00:46:02 UTC (rev 28582)
+++ Zope3/trunk/src/zope/app/pluggableauth/__init__.py 2004-12-08 01:33:06 UTC (rev 28583)
@@ -13,6 +13,8 @@
##############################################################################
"""Pluggable Authentication service implementation.
+BBB: ENTIRE PACKAGE IS DEPRECATED!!! 12/05/2004
+
$Id$
"""
__docformat__ = 'restructuredtext'
@@ -61,7 +63,12 @@
implements(IPluggableAuthenticationService, IOrderedContainer)
- def __init__(self, earmark=None):
+ def __init__(self, earmark=None, hide_deprecation_warning=False):
+ if not hide_deprecation_warning:
+ import pdb; pdb.set_trace()
+ warn("The `pluggableauth` module has been deprecated in favor of "
+ "the new `pas` code, which is much more modular and powerful.",
+ DeprecationWarning, 2)
self.earmark = earmark
# The earmark is used as a token which can uniquely identify
# this authentication service instance even if the service moves
@@ -153,7 +160,7 @@
def addPrincipalSource(self, id, principal_source):
""" See `IPluggableAuthenticationService`.
- >>> pas = PluggableAuthenticationService()
+ >>> pas = PluggableAuthenticationService(None, True)
>>> sps = BTreePrincipalSource()
>>> pas.addPrincipalSource('simple', sps)
>>> sps2 = BTreePrincipalSource()
@@ -170,7 +177,7 @@
def removePrincipalSource(self, id):
""" See `IPluggableAuthenticationService`.
- >>> pas = PluggableAuthenticationService()
+ >>> pas = PluggableAuthenticationService(None, True)
>>> sps = BTreePrincipalSource()
>>> pas.addPrincipalSource('simple', sps)
>>> sps2 = BTreePrincipalSource()
Modified: Zope3/trunk/src/zope/app/pluggableauth/browser/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pluggableauth/browser/configure.zcml 2004-12-08 00:46:02 UTC (rev 28582)
+++ Zope3/trunk/src/zope/app/pluggableauth/browser/configure.zcml 2004-12-08 01:33:06 UTC (rev 28583)
@@ -4,12 +4,13 @@
<!-- Pluggable Authentication Service -->
- <addMenuItem
+ <!-- BBB: Deactivated as a deprecation measure. -->
+ <!--addMenuItem
class="zope.app.pluggableauth.PluggableAuthenticationService"
title="Authentication Service"
description="A Pluggable Authentication uses plug-in principal sources."
permission="zope.ManageServices"
- />
+ /-->
<containerViews
for="zope.app.pluggableauth.interfaces.IPluggableAuthenticationService"
Modified: Zope3/trunk/src/zope/app/pluggableauth/tests/authsetup.py
===================================================================
--- Zope3/trunk/src/zope/app/pluggableauth/tests/authsetup.py 2004-12-08 00:46:02 UTC (rev 28582)
+++ Zope3/trunk/src/zope/app/pluggableauth/tests/authsetup.py 2004-12-08 01:33:06 UTC (rev 28583)
@@ -41,7 +41,7 @@
PrincipalAuthenticationView)
auth = setup.addService(sm, "PluggableAuthService",
- PluggableAuthenticationService())
+ PluggableAuthenticationService(None, True))
one = BTreePrincipalSource()
two = BTreePrincipalSource()
Modified: Zope3/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py
===================================================================
--- Zope3/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py 2004-12-08 00:46:02 UTC (rev 28582)
+++ Zope3/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py 2004-12-08 01:33:06 UTC (rev 28583)
@@ -53,7 +53,7 @@
PrincipalAuthenticationView)
auth = setup.addService(sm, "TestPluggableAuthenticationService",
- PluggableAuthenticationService())
+ PluggableAuthenticationService(None, True))
one = BTreePrincipalSource()
two = BTreePrincipalSource()
More information about the Zope3-Checkins
mailing list