[Zope-PTK] ptk/zope newbie question- please read

Steve Alexander steve@cat-box.net
Fri, 30 Jun 2000 13:36:29 +0100


Chris Withers wrote:
> 
> > 2)
> > Where/how do you make it so that all new members are
> > automatically given contributor rights? (I don't want to have to
> > publish everyone's stuff in small company intranet)
> 
> I'd love to know this too... ;-)
> Also, how do I make someone a reviewer without dropping back to the Zope
> management interface?
> 
> > Any suggestions?

I used an external method to give all my users whose usernames begin
with "u" a particular role.

def updateRoles(self):
  """ Update some of the users in acl_users to have the Contributor
role"""
  for u in self.acl_users.getUsers():

    if u.getUserName()[0] == 'u':
      print 'User is', u, 
      print u.roles,
      u.roles.append('Contributor')
      u._p_changed=1
      print 'changed to:', u.roles

This is a *hack* though!

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net