membrane supports it easily. The common way to do that is to add a
workflow to your user type, and check the workflow state in your
authentication method. For example:
def authenticateCredentials(self):
wt=getToolByName(self, "portal_workflow")
state=wt.getInfoFor(self, "review_state")
if state!="approved":
return None
# otherwise do normal checking
Ross appears to have added a special permission to handle this
("membrane: Can authenticate") as well. I'm not entirely convinced that
should be in membrane core itself; it feels like something that should
be done in a IMembraneUserAuth implementation, so I'm tempted to rip
that out.
> are there other approaches people are taking to provide
> approval-regulated membership? might it be that membrane/remember needs
> to be polished more to gain greater acceptance?
It certainly needs some readable documentation. I've dropped a few
sphinx bits in the codebase today, but the documentation needs a lot
more work before I would consider it developer friendly.
Wichert.
--
Archive: http://www.coactivate.org/projects/remember/lists/remember/archive/2010/08/1283181106246
On 8/30/10 17:04 , ken manheimer wrote:membrane supports it easily. The common way to do that is to add a workflow to your user type, and check the workflow state in your authentication method. For example:
i'd like to understand better where membrane/remember fits in to the
evolving plone world. there's at least one membrane/remember feature
that i consider necessary for many portal membership situations, and
think it's important enough to warrant more official adoption into the
plone core, or else alternative ways to implement the feature, if
member/remember isn't somehow suitable.
def authenticateCredentials(self):
wt=getToolByName(self, "portal_workflow")
state=wt.getInfoFor(self, "review_state")
if state!="approved":
return None
# otherwise do normal checking
Ross appears to have added a special permission to handle this ("membrane: Can authenticate") as well. I'm not entirely convinced that should be in membrane core itself; it feels like something that should be done in a IMembraneUserAuth implementation, so I'm tempted to rip that out.
It certainly needs some readable documentation. I've dropped a few sphinx bits in the codebase today, but the documentation needs a lot more work before I would consider it developer friendly.are there other approaches people are taking to provide
approval-regulated membership? might it be that membrane/remember needs
to be polished more to gain greater acceptance?
Wichert.
I've ripped it out. As compensation I've added a FAQ page to the sphinx
with an example for implementating this.
Wichert.
--
Archive: http://www.coactivate.org/projects/remember/lists/remember/archive/2010/08/1283200959936
On 8/30/10 17:11 , Wichert Akkerman wrote:I've ripped it out. As compensation I've added a FAQ page to the sphinx with an example for implementating this.
Ross appears to have added a special permission to handle this
("membrane: Can authenticate") as well. I'm not entirely convinced that
should be in membrane core itself; it feels like something that should
be done in a IMembraneUserAuth implementation, so I'm tempted to rip
that out.
Wichert.
That was not a change I made actually. The code you are referring to was
deprecated a 18 months ago, and was removed 14 months ago to be replaced
with the simple permission check which I did remove.
http://dev.plone.org/collective/changeset/88643/Products.membrane/trunk
and
http://dev.plone.org/collective/changeset/88634/Products.membrane/trunk
are the relevant changesets.
> moving them will break configuration of remember-derived
> implementations that use different active states than
> Product.remember's. (my product uses different active states, so i will
> have to change them.)
I think Ross's basic idea was sound: remember should be updated to use a
permission instead of hardcoding workflow state names. You can then
easily use a custom workflow.
Wichert.
--
Archive: http://www.coactivate.org/projects/remember/lists/remember/archive/2010/08/1283237678338