Re: [Zope] Adding users via external method

2000-06-27 Thread Timothy Grant

Following up on my own message...

OK, so now I have a lovely external method that reads a datafile, returns a
list of tuples that I can then use in a DTML Method to add my users. So far
so good.

I have come upon some situations where I also need to add Roles. I can find
nothing archived nor on the Zope site about programmatically adding Roles.
Can anyone assist me?

Thanks.

On Wed, Jun 21, 2000 at 12:45:27PM -0700, Timothy Grant wrote:
 Hi all,
 
 I'm working on a project where it would be very nice to add all the original
 users via a script.
 
 I'm working with an external method that should--I believe use manage_user()
 to add the users.
 
 My confusion comes from where does the external method go in the hierarchy?
 From my reading it appears that to act on a folder, you need to be operating
 within that folder (e.g., I can add folders and stuff to my current folder
 all day). I haven't yet figured out how to operate on the acl-users folder
 that is the child of my current folder.
 
 As always, thanks for any assistance that you can provide.

-- 
Stand Fast,
tjg.

Timothy Grant [EMAIL PROTECTED]
Chief Technology Officer  www.exceptionalminds.com
Red Hat Certified Engineer  (503) 246-3630
Avalon Technology Group, Inc.   fax (503) 246-3124
Linux...Because crashing isn't normal

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Adding users via external method

2000-06-27 Thread ethan mindlace fremen

Timothy Grant wrote:

 I have come upon some situations where I also need to add Roles. I can find
 nothing archived nor on the Zope site about programmatically adding Roles.
 Can anyone assist me?

hmm.  I don't know how you're adding users without indicating their
roles.

I do this:

  dtml-call "acl_users.manage_users('Add',REQUEST)"

where REQUEST includes these variables:

name
password
confirm
roles

And roles is a list.

-- 
ethan mindlace fremen
Zopatista Community Liason

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Adding users via external method

2000-06-22 Thread ethan mindlace fremen

Timothy Grant wrote:

 I'm working on a project where it would be very nice to add all the original
 users via a script.
 
 I'm working with an external method that should--I believe use manage_user()
 to add the users.

I use a dtml_method for this, actually. I don't know how to do it with
an external method (or why you would want to).

I have an external method that does external things, like call adduser
on the system, but the things you do inside the ZODB are probably better
done in a Product or just a regular method.

hope that helps,

~ethan fremen

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )