<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Jim,<br>
Alright, I found the way to get needed user information in order to
merge (create users in a dest folder).<br>
<br>
You need an external script. Otherwise you will not be able to access
acl_users _getPassword(). Local scripts enforce this for security
reasons.<br>
<br>
So here is the external script that you can modify to your needs<br>
<br>
#----------------------------------------<br>
#Zope/Extensions/getUserData.py<br>
# just pass in the *source* acl_users folder<br>
#----------------------------------------<br>
def getUserData(self,acl_users):<br>
<br>
users = acl_users.getUsers()<br>
<br>
dict = {}<br>
for user in users:<br>
dict[user.getId()] = {'name' : user.getUserName(), 'password' :
user._getPassword(), 'roles' : user.getRoles() }<br>
return dict<br>
<br>
Then call this with a local python script:<br>
<br>
request = context.REQUEST<br>
users = container.getPasswords(acl_users)<br>
for k in users:<br>
user = users[k]<br>
print k,user['password'],user['name'],user['roles'] # to test<br>
<br>
Hope this helps you reach the "tipping point" if you've not already
gotten there.<br>
<br>
David<br>
<br>
<br>
<blockquote cite="mid42BB2550.1070807@earthlink.net" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Jim,<br>
<br>
David H didn't think thru his answer. I do not think you can acquire
*passwords* the way I indicated. If so my suggestion will not work.
The approach will work otherwise.<br>
<br>
Maybe someone that knows about this will pitch in. I'm reviewing
User.py now...<br>
<br>
David<br>
. <br>
<br>
<br>
David H wrote:
<blockquote cite="mid42BB17CC.7080105@earthlink.net" type="cite">
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
<pre><i>Jim,
It can be done, eg
loop thru source.acl_users
for each user object
stuff REQUEST with name,password,confirm (password again) and roles, eg
REQUEST.set('name',username), etc
</i><i> context.Destination.acl_users.manage_users('Add',REQUEST,RESPONSE)</i><i>
David
</i></pre>
<br>
Jim Abramson wrote:
<blockquote
cite="midD17DB304A9F42B4787B68861F9DAE61C021CF97A@wgdc02.wgenhq.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator"
content="MS Exchange Server version 6.0.6603.0">
<title>merging the contents of two acl_users folders</title>
<!-- Converted from text/rtf format -->
<p><font face="Arial" size="2">Can it be done? (programmically
obtain data from one acl_users folder and merge into another)</font> </p>
<p><font face="Arial" size="2">If not that, the ability to move
selected users from one acl_users to another would be a decent plan B.</font>
</p>
<p><font face="Arial" size="2">This is a one-time move, so I
consider
any effective solution viable, even if some manual hacking is involved.</font>
</p>
<p><font face="Arial" size="2">Thanks for any help,</font> <br>
<font face="Arial" size="2">Jim</font> </p>
<br>
</blockquote>
<br>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>