[Zope] how to check a user role with data entred by user?

Lennart Regebro regebro at gmail.com
Thu Mar 5 16:32:47 EST 2009


On Thu, Mar 5, 2009 at 09:21, Dvir Bar-lev <dvir.b at 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


More information about the Zope mailing list