[Zope-CVS] CVS: Products/PluggableAuthService/plugins -
BasePlugin.py:1.4.6.1
Zachery Bir
zbir at urbanape.com
Fri May 27 14:32:02 EDT 2005
Update of /cvs-repository/Products/PluggableAuthService/plugins
In directory cvs.zope.org:/tmp/cvs-serv6937
Modified Files:
Tag: zbir_fixing_ids_branch
BasePlugin.py
Log Message:
Give all Plugins a 'prefix' property
=== Products/PluggableAuthService/plugins/BasePlugin.py 1.4 => 1.4.6.1 ===
--- Products/PluggableAuthService/plugins/BasePlugin.py:1.4 Sat Nov 20 12:53:44 2004
+++ Products/PluggableAuthService/plugins/BasePlugin.py Fri May 27 14:31:52 2005
@@ -17,6 +17,7 @@
$Id$
"""
from OFS.SimpleItem import SimpleItem
+from OFS.PropertyManager import PropertyManager
from Acquisition import aq_parent, aq_inner
from AccessControl import ClassSecurityInfo
from App.class_init import default__class_init__ as InitializeClass
@@ -26,7 +27,7 @@
from Products.PluggableAuthService.permissions import ManageUsers
-class BasePlugin(SimpleItem):
+class BasePlugin(SimpleItem, PropertyManager):
""" Base class for all PluggableAuthService Plugins
"""
@@ -35,22 +36,29 @@
__implements__ = SimpleItem.__implements__
- manage_options = ( ( { 'label': 'Activate',
+ manage_options = ( ( { 'label': 'Activate',
'action': 'manage_activateInterfacesForm', }
,
)
+ SimpleItem.manage_options
+ + PropertyManager.manage_options
)
+ prefix = ''
+
+ _properties = (
+ dict(id='prefix', type='string', mode='w',
+ label='Optional Prefix'),)
+
security.declareProtected( ManageUsers, 'manage_activateInterfacesForm' )
manage_activateInterfacesForm = PageTemplateFile(
- 'www/bpActivateInterfaces', globals(),
+ 'www/bpActivateInterfaces', globals(),
__name__='manage_activateInterfacesForm')
security.declareProtected( ManageUsers, 'listInterfaces' )
def listInterfaces( self ):
""" For ZMI update of interfaces. """
-
+
results = []
for iface in flattenInterfaces( self.__implements__ ):
@@ -73,7 +81,7 @@
active_interfaces = []
for iface_name in interfaces:
- active_interfaces.append( plugins._getInterfaceFromName(
+ active_interfaces.append( plugins._getInterfaceFromName(
iface_name ) )
pt = plugins._plugin_types
More information about the Zope-CVS
mailing list