I'am using the following code in one of my Products.

obj =

                folder = AccessControl.User.UserFolder()
                obj._setObject('acl_users', folder)
                rechte = ['Access contents information','View']
                for recht in rechte:
                    p = AccessControl.Permission.Permission(recht, '',
                    p.setRole('Kunde', recht in rechte)
                obj.acl_users._addUser(name="test", password="passwort",
confirm="passwort", roles=['Kunde'], domains=[''])

I'am adding an obj of the Class Kunde in any Folder. The Class Kunde
should consist of an UserFolder, and has a Role named Kunde with the
Permissions Access contents information and View.
This all works fine, but inside the UserFolder a should should be added
with a name test and the password passwort.

Now the problem is, the user will be added, but the password does not
work. i have added a function test to User.py the returns the password
of the current user object.

    def test(self):
       """ doc string """
       return self.__

If i call the function test from a dtml document it returns "passwort"
as the password, but when the browser opens the authentication request
window and i write test as the username and passwort as the password i
get the message returned that the username or password is wrong. But
when i open the user-object in the acl_users and open the user test and
fill in in the password and confirm field the value of "passwort"
everything works fine.
No where is the problem. is it in my _addUser() function or somewhere

Please Help.


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to