[Zope-CMF] Default roles

Kevin Carlson khcarlso@bellsouth.net
Tue, 16 Jul 2002 15:27:13 -0400


You can also do this in a python script if you want to write your own "join"
logic.  The code snippet below will handle adding the roles you mentioned.

r =  ('Member', 'Author', 'Reviewer')
portal_registration.addMember(REQUEST['username'], password, roles=r,
properties=REQUEST)


Kevin

-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of Florent Guillaume
Sent: Tuesday, July 16, 2002 12:18 PM
To: zope-cmf@zope.org
Subject: Re: [Zope-CMF] Default roles


Damon Eckhoff  <eckhoffd@missouri.edu> wrote:
> What is the proper/expected way to change the default roles granted to a
> user when they register with a portal?  I'm using CMF 1.3Beta, and would
> like have members granted the roles: Member, Author, and Reviewer by
default
> when they register.  How do I keep it kosher?  Extend the
RegistrationTool?
> I would be grateful for some guidance on this issue.

Yes, subclass RegistrationTool and override addMember.

Florent

--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com


_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests