I didn't explain myself properly, I shall try again.

I created in the ZMI thru the user manager a user, than I created thru
the role manager a role,
Now I have 2 things that I do nt how to do and that's what I need help

1 - how do I associate a particular role to a particular user in the zmi
2 - in a log in form someone entres a user name and a password how can I
from a script find out if the same user and password exists in the zmi
and what role he has and than direct gim to an appropriate page?

Again I emphasize I need to do this from a script that I write and I
don't want to use the log in screen that the zope pops up if he tries to
enter a forbidden page 

-----Original Message-----
From: Lennart Regebro [mailto:rege...@gmail.com] 
Sent: Sunday, March 08, 2009 2:40 PM
To: Dvir Bar-lev
Cc: zope-pas@zope.org
Subject: Re: [Zope-PAS] user login and roles

On Sun, Mar 8, 2009 at 13:30, Dvir Bar-lev <dvi...@puresight.com> wrote:
> Now how do I assign a role to a user based on his password?

No, you assign a role to the user on the ZODB Role manager plugin.

> I get to the log in page that the cookie plugin gave me, now I enter a
> name and password and press the submit button, I now want to see if I
> have a user that was defined in the ZMI with the same name and

That is done by User Manager plugin already. You don't have to do
anything. If it wasn't done, you wouldn't be able to log in, see?

> and if there is how can I get what role he has and assign it to the
> that entered the data in the log in form.

You don't assign roles on login time.

Lennart Regebro: Pythonista, Barista, Notsotrista.
+33 661 58 14 64
Zope-PAS mailing list

Reply via email to