Re: [Zope] Adding users with a PythonMethod

2001-01-23 Thread Dieter Maurer

Curtis Maloney writes:
 >  I'm trying to add a users from within a PythonMethod.  I have searched this 
 > list and found examples of how to add via DTML, but they all seem to require 
 > REQUEST.
 > ...
 >  So, what I'm left to conclude is it's easier to add a new user from DTML 
 > than it is from a PythonMethod.
Can't be!

You can use REQUEST in a PythonMethod, too.
Either pass it explicitly as parameter or
use "self.REQUEST" to access it.



Dieter

___
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 )




[Zope] Adding users with a PythonMethod

2001-01-22 Thread Curtis Maloney

Greetings,

I'm trying to add a users from within a PythonMethod.  I have searched this 
list and found examples of how to add via DTML, but they all seem to require 
REQUEST.

I have built a dictionary containing the appropriate keys, and passed that 
as REQUEST, and the following error occurs:

Error Type: KeyError
Error Value: SCRIPT_NAME


From what I can see of the sources, if you pass a non-None REQUEST to 
_addUser (via manage_users) it will return manage_main.  This seems odd to 
me, because I can't see how you could pass the user details otherwise.

So, what I'm left to conclude is it's easier to add a new user from DTML 
than it is from a PythonMethod.

I hope I'm missing something here...  any ideas?

Have a better one,
Curtis Maloney



___
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 To Acl_users

2000-12-14 Thread Mike Kelland

Perfect, thank you so much!

Mike Kelland - slowly getting the hang of this whole Zope thing...
[EMAIL PROTECTED]
- Original Message -
From: "Steve Drees" <[EMAIL PROTECTED]>
To: "Mike Kelland" <[EMAIL PROTECTED]>
Cc: "Zope@Zope. Org" <[EMAIL PROTECTED]>
Sent: Thursday, December 14, 2000 11:35 AM
Subject: RE: [Zope] Adding Users To Acl_users


> > Is it possible to add users to acl users from a form other than that in
> the acl_users folder?
> > I've tried replicating the form within a dtml-with acl_users tag with no
> luck so far, has
> > anyone actually done this and made it work?
>
> 
> 
> 
> 
> 
>
> Creates a user bill with password mypassword and role of RegisteredUser
>
>
> ___
> 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 )
>
>


___
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 To Acl_users

2000-12-14 Thread Steve Drees

> Is it possible to add users to acl users from a form other than that in
the acl_users folder?
> I've tried replicating the form within a dtml-with acl_users tag with no
luck so far, has
> anyone actually done this and made it work?







Creates a user bill with password mypassword and role of RegisteredUser


___
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 )




[Zope] Adding Users To Acl_users

2000-12-14 Thread Mike Kelland




Is it possible to add users to acl users from a 
form other than that in the acl_users folder? I've tried replicating the form 
within a dtml-with acl_users tag with no luck so far, has anyone actually done 
this and made it work?
 
Thanks!
Mike Kelland
[EMAIL PROTECTED]
 


[Zope] Adding users to acl_users

2000-12-08 Thread Mike Kelland



Hi everyone, 
 
I tried to add the manage_users thing that someone 
referred me to (sorry that I don't remember who) and got the following 
error:
 
Error Type: KeyErrorError Value: 
__cmp__
 
my code is as follows:
 
User Name: 
 
Password:Confirm Password: 
 
Role:  Manager 
Owner    
User
 

-END-
to get the information and I'm using the 
code:
 

to process it.  I've taken the code pretty 
much directly from the acl_users folder's Add form...  Anyone know what's 
going on? 
 
Thanks again for everyone's help.  The 
_.str(date) thing worked perfectly with my Access date problem... 
 
Mike Kelland
[EMAIL PROTECTED]
 


Re: [Zope] Adding users

2000-12-06 Thread Randall Kern



Something like this should work:
 

    

 
It will look in the REQUEST for the following 
fields:
    name
    password
    confirm (this must match 
password)
    roles
    domains
 
So either set these from an HTML form, or use 
.  For examples of the 
form technique, look at zope/lib/python/AccessControl/addUser.dtml
 
-Randy

  - Original Message - 
  From: 
  Mike 
  Kelland 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, December 06, 2000 8:47 
  PM
  Subject: [Zope] Adding users
  
  Is it possible to have a form in a zope page that 
  allows you to add a new user to the acl_users folder?  I can get the data 
  I need, I just need to know, if I have the user name and password as dtml 
  variables, and the user adding the other user has all the appropriate 
  permissions, is there a way in dtml to use this information to add a user 
  (with a defined role).
   
  Thanks very much for this and prior 
  help!
   
  Mike Kelland
  [EMAIL PROTECTED] 



[Zope] Adding users

2000-12-06 Thread Mike Kelland



Is it possible to have a form in a zope page that 
allows you to add a new user to the acl_users folder?  I can get the data I 
need, I just need to know, if I have the user name and password as dtml 
variables, and the user adding the other user has all the appropriate 
permissions, is there a way in dtml to use this information to add a user (with 
a defined role).
 
Thanks very much for this and prior 
help!
 
Mike Kelland
[EMAIL PROTECTED] 



Re: [Zope] Adding users via external method

2000-06-27 Thread Timothy Grant

I am specifying roles, however, it turns out that some of the roles don't
exist within the Zope framework yet, so I need to add the roles before I
attempt to add the user.

On Tue, Jun 27, 2000 at 09:36:55PM -0400, ethan mindlace fremen wrote:
> 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:
> 
>   
> 
> where REQUEST includes these variables:
> 
> name
> password
> confirm
> roles
> 
> And roles is a list.

-- 
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:

  

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-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-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 )




[Zope] Adding users via external method

2000-06-21 Thread Timothy Grant

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   MIG #1433
Avalon Technology Group, Inc. '00 Marauder  
Slight disorientation after prolonged system uptime is 
>>normal for new Linux users<<


___
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 )