[Zope-CVS] SVN: ldapadapter/trunk/ Added ManageableLDAPAdapter class
Roger Ineichen
roger at projekt01.ch
Sat Oct 9 10:16:47 EDT 2004
Log message for revision 27835:
Added ManageableLDAPAdapter class
Change registration
Changed:
U ldapadapter/trunk/browser/configure.zcml
U ldapadapter/trunk/configure.zcml
U ldapadapter/trunk/utility.py
-=-
Modified: ldapadapter/trunk/browser/configure.zcml
===================================================================
--- ldapadapter/trunk/browser/configure.zcml 2004-10-09 14:15:19 UTC (rev 27834)
+++ ldapadapter/trunk/browser/configure.zcml 2004-10-09 14:16:47 UTC (rev 27835)
@@ -5,14 +5,14 @@
<!-- LDAPAdapter -->
<tool
- interface="ldapadapter.interfaces.ILDAPAdapter"
+ interface="ldapadapter.interfaces.IManageableLDAPAdapter"
title="LDAP Adapter"
description="A LDAP adapter."
/>
<addform
label="LDAP Adapter"
- for= "ldapadapter.interfaces.ILDAPAdapter"
+ for= "ldapadapter.interfaces.ILDAPAdapterManagement"
name="addLDAPAdapter.html"
schema="zope.app.utility.interfaces.IUtilityRegistration"
class="zope.app.utility.browser.AddRegistration"
@@ -24,12 +24,19 @@
fields="name interface permission status"
/>
- <!-- Menu entry for "Add Utility" menu -->
<addMenuItem
- class="ldapadapter.LDAPAdapter"
+ class="ldapadapter.ManageableLDAPAdapter"
title="LDAP Adapter"
description="A LDAP adapter"
permission="zope.ManageServices"
/>
+ <editform
+ for="ldapadapter.interfaces.IManageableLDAPAdapter"
+ schema="ldapadapter.interfaces.ILDAPAdapterManagement"
+ name="edit.html"
+ menu="zmi_views" title="Edit"
+ permission="zope.ManageContent"
+ />
+
</configure>
Modified: ldapadapter/trunk/configure.zcml
===================================================================
--- ldapadapter/trunk/configure.zcml 2004-10-09 14:15:19 UTC (rev 27834)
+++ ldapadapter/trunk/configure.zcml 2004-10-09 14:16:47 UTC (rev 27835)
@@ -5,10 +5,10 @@
i18n_domain="ldapadapter"
>
- <content class="ldapadapter.LDAPAdapter">
+ <content class="ldapadapter.ManageableLDAPAdapter">
<factory
- id="ldapadapter.LDAPAdapter" />
+ id="ldapadapter.ManageableLDAPAdapter" />
<implements
interface="zope.app.utility.interfaces.ILocalUtility" />
@@ -16,16 +16,13 @@
<implements
interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
- <implements
- interface="ldapadapter.interfaces.ILDAPAdapter" />
-
<require
permission="zope.ManageServices"
- interface="ldapadapter.interfaces.ILDAPAdapter" />
+ interface="ldapadapter.interfaces.IManageableLDAPAdapter" />
<require
permission="zope.ManageServices"
- set_schema="ldapadapter.interfaces.ILDAPAdapter" />
+ set_schema="ldapadapter.interfaces.IManageableLDAPAdapter" />
</content>
Modified: ldapadapter/trunk/utility.py
===================================================================
--- ldapadapter/trunk/utility.py 2004-10-09 14:15:19 UTC (rev 27834)
+++ ldapadapter/trunk/utility.py 2004-10-09 14:16:47 UTC (rev 27835)
@@ -33,6 +33,7 @@
from interfaces import ILDAPAdapter
from interfaces import ILDAPConnection
+from interfaces import IManageableLDAPAdapter
SCOPES = {'base': SCOPE_BASE,
'one': SCOPE_ONELEVEL,
@@ -129,4 +130,14 @@
values[:] = [unicode(v, 'utf-8') for v in values]
results.append((dn, entry))
return results
+
+
+class ManageableLDAPAdapter(LDAPAdapter, Persistent, Contained):
+ """LDAP adapter utility
+
+ """
+
+ implements(IManageableLDAPAdapter)
+
+ serverURL = u"ldap://localhost"
More information about the Zope-CVS
mailing list