[Zope-PTK] automatically creating members

Tres Seaver tseaver@palladion.com
Tue, 02 May 2000 15:13:09 -0500


Ty Sarna wrote:
> 
> In article <B52D33D3.1E28%Deano@tomsnyder.com>,
> deano  <Deano@tomsnyder.com> wrote:
> > > What I'd like to know is if there's a way that I can have all of those
> > > people be members of my PTK portal without them actually having to sign up
> > > manually. Their Zope password should be the same as their existing NDS
> > > password.
> > >
> > I'm trying to do the same thing, a bit smaller scale, but same idea. There
> > are basically two options, which give you varying levels of happiness:
> >
> > 1) LDAPAdapter + NDS 8/eDirectory LDAP-served info
> >
> >   This is out now, not PTK-aware, but works if you have a lot of time to
> > bang your head against the wall with NDS's implementation of LDAP.
> 
> We have an LDAPUserSource for LoginManager already in production here.
> It needs a little bit of cleanup and reorganization, some documentation,
> and we have to fix a small bug in the ZLDAPConnection product, but then
> we expect to release it.  Since it's a LoginManger UserSource, it will
> get you propertysheet support and PTK-compatability.

Here is a small patch to make PTK-against-LoginManager work as expected:

Index: PersistentUserSource.py
===================================================================
RCS file: /cvs-repository/ZopePTK/PTKDemo/PersistentUserSource.py,v
retrieving revision 1.4
diff -u -r1.4 PersistentUserSource.py
--- PersistentUserSource.py     2000/03/03 17:33:06     1.4
+++ PersistentUserSource.py     2000/05/02 19:10:02
@@ -82,6 +82,10 @@
     def getHomeUrl(self):
         return self.getPortal().Members[self.getUserName()].absolute_url()

+    def get_toolbox_actions(self, klass=None):
+        """Hmmm, fake this for now."""
+        return self.toolbox_actions()
+
     def toolbox_actions(self):
         """Implements the Toolbox Action Provider interface"""
         return [

I couldn't figure out why I wasn't seeing "My Stuff" in the toolbox when I built
a portal using LoginManager as the user DB -- the trick is that the LoginMember
object didn't expose 'get_toolbox_actions()', but only 'toolbox_actions()'.  I
don't *believe* that the user object should do any further mucking about with
the list than this, but I welcome corrections.

I'll add this to the Tracker as well, but figured maybe someone was scratching
their heads like me, and hadn't gotten around to looking yet.

Tres.
-- 
=========================================================
Tres Seaver  tseaver@digicool.com   tseaver@palladion.com