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

Andreas Jung lists at zopyx.com
Sun Mar 8 05:39:55 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08.03.2009 9:42 Uhr, Lennart Regebro wrote:
> On Sun, Mar 8, 2009 at 08:07, Dvir Bar-lev <dvir.b at puresight.com> wrote:
>> 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
> 
> You already have. You gave Zoe the role "Manager", you say. OK. Done.
> You don't need to do anything more.
> 
> 
> I suspect you still need to explain, not what you are trying to do,
> but what you are trying to achieve. Explain the usecase.

Write a form with two fields username + password, configure the cookie
crumbler in order to intercept both name from the request for
authentication. Within the script called by the form you can check the
roles assigned to the current user and perform the redirection as
needed. This is trivial.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkmzkmsACgkQCJIWIbr9KYw/pwCfUfEQdYig9yIxYfmlm+crPIWQ
NwkAoNGzTfPakrlRmIfUrBCoOjN9rbR5
=2LW/
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20090308/56419159/attachment.vcf 


More information about the Zope mailing list