OK I give up. I couldn't find a way to make it work without relying in the current implementation, so I went with that:
http://pypi.python.org/pypi/Products.NoDuplicateLogin/1.0a1 Alex P.S. Curiously, relying on Zope 2 sessions for the no duplicate cookie seemed to produce unexpected conflict errors (vs. relying on the OOBTrees for the mappings which you'd expect to produce them on large sites). So I ripped out the "experimental" session storage for the no duplicate cookie and stored along with the mappings as an attribute on the plugin itself. Gross, but seems like it will work for small sites, for some value of "works". On 12/17/10 1:32 PM, Alex Clark wrote: > On 12/16/10 12:29 PM, Alex Clark wrote: > … >> >> - I need to replace the "mappings" (OOBTrees) functionality with >> something less insane. The most likely candidate is Zope 2 sessions. I'm >> able to do stuff like this: >> >> self.REQUEST.SESSION['mapping1'] = *something* >> self.REQUEST.SESSION['mapping2'] = *something* >> >> To try and mimick the current functionality. But I'm not sure if that >> approach will offer a viable alternative to the current setup with OOBTrees. >> >> In other words, are Zope 2 sessions "persistent enough" in this case? I >> have a feeling that elro's suggestion of using the browser_id_manager >> and session_data_manager is where I need to go. But I can't quite >> picture how that will work. >> >> The code is here: >> http://dev.plone.org/collective/browser/PASPlugins/Products.NoDuplicateLogin/trunk/Products/NoDuplicateLogin/plugin.py >> >> Additional eyes/comments appreciated :-) > > To put it another way: I'm wondering if there is anything significant > about creating a persistent storage such that any given "session" relies > on a mapping having already been created. > > I don't have a complete understanding of the implementation yet, but I > know there is: > > - a mapping1 and mapping2 stored in OOB trees > - a cookie managed by NoDuplicateLogin > - a comparison made between mapping1 and mapping2 during > authenticateCredentials to decide if the user is already logged in. if > so, they are logged out via resetCredentials. > > (Just thinking out loud here.) > > Compare and contrast that with what elro suggested here: > https://github.com/collective/loo/blob/master/README.txt#L36 and you > will arrive at the cloud of fuzz I currently have in my head, about what > to do next. > > > Alex > > > > > > > > > > >> >> Thanks >> >> >> >> Alex >> >> >> >> >> >> >> >> >>> >>> >>> >>> Alex >>> >>> >>> >>> >>> >>> >>> >>>> >>>> >>> >> >> > > -- Alex Clark · http://aclark.net Author · http://aclark.net/admin _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
