[Zope] [Fwd: [BTreeFolder2] BTree keys corruption problem]
Max M
maxm at mxm.dk
Wed Feb 25 05:08:54 EST 2004
FLORAC Thierry wrote:
> On Tue, 2004-02-24 at 15:20, Max M wrote:
> P.S. : I said that my problem was nearly solved because each user
> profile is private, so the user identified with the user id " tflorac"
> can't access the profile called "tflorac". Is there any way to alter the
> user authentication name ??
If I understand your problem correctly, you can write an external script
that goes over your_acl users and strips the user name if it has spaces
in it, and then creates a new user with the stripped id.
You can find the api of the acl_users folder in:
<ZOPE>\LIB\python\AccessControl\User.py
The code would look something like this (untested ;-) ):
acl = self.acl_users
users_to_delete = []
for old_user_name in acl.getUserNames():
stripped_name = old_user_name.strip()
if stripped_name != old_user_name:
old_user = acl.getUser(old_user_name)
password = old_user._getPassword()
roles = old_user.getRoles()
domains = old_user.getDomains()
acl._doAddUser(stripped_name, password, roles, domains)
users_to_delete.append(old_user_name)
acl._doDelUsers(users_to_delete)
regards Max M
More information about the Zope
mailing list