K, ill try to explain in more detail. :)
What I want to do is this:

I create 2 roles in zope - manager and client for example.
I than create 2 users - zoe and don.
Zoe has password A and role manager and don has password B and role client.
Now I go to the log in page of my site, it has 2 fields - username and password.
What I want to do is this:
If the user puts in the fileds zoe and A I want to be able to identify the user 
zoe with the role manager
And if he puts don and B I want to identify him with the role client, anything 
else he puts in I want to consider him as an anonymus user.

I hope this clears things up :)

-----Original Message-----
From: Lennart Regebro [mailto:rege...@gmail.com] 
Sent: Thursday, March 05, 2009 11:33 PM
To: Dvir Bar-lev
Cc: zope@zope.org
Subject: Re: [Zope] how to check a user role with data entred by user?

On Thu, Mar 5, 2009 at 09:21, Dvir Bar-lev <dvi...@puresight.com> wrote:
> What I did was this, I created a folder in the ZMI and there I created a
> user folder(acl_users), in the user folder I defined  2 new roles.
>
> Now, I have a log in form where the user fills out user name and password, I
> want to check if the data he entered matches 1  of the roles I defined in
> the ZMI . I can't find any info or example how to do it, not on the web nor
> in the documentation.

This is a classic case of you not telling is what you want to do.
Why do you want to check if the data he enters matches on of the roles?

You do that with

 if entered_data in (role1, role2):

which I suspect isn't what you are asking at all. :) Tell us what you
are trying to achieve.

-- 
Lennart Regebro: Pythonista, Barista, Notsotrista.
http://regebro.wordpress.com/
+33 661 58 14 64
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to