Hi, i'm developing a site where there are about nine kind of users. When an user enter to the site, he is an Anonymous User, but i have a button that its purpose is to change of current user to another that exists in an acl_users folder. The user must enter the name and password of the user he wants to login as. This is what i don't know to do, i have read a lot of documentation, and i have tried with the function 'authenticate', but when i show the name of the current user (AUTHENTICATED_USER.getUserName), it appears always the user as i login in the Zope Management Interface. When i was reading documentation, i saw that many people wanted to do this before, but i wrote the examples and they didn't work for me. I know that there are products to solve this problem (like LoginManager), but i prefer to do it without using them. Can anybody help me?
Juan Garcia Garcia writes:
i'm developing a site where there are about nine kind of users. When an user enter to the site, he is an Anonymous User, but i have a button that its purpose is to change of current user to another that exists in an acl_users folder. The user must enter the name and password of the user he wants to login as. You cannot easily use Basic Authentication for this. You need Cookie based Authentication. There are lots of User Folders that support Cookie based authentication. As an alternative, you can use Shane's CookieCrumbler.
When you use Cookie based authentication, you simply somehow define the form variables you find in the login form and submit to the corresponding action. Dieter
participants (2)
-
Dieter Maurer -
Juan Garcia Garcia