Hi,
#foreach($newuser in $projectuserlist)
#set ($myspace = $xwiki.getDocument("${projectname}.WebPreferences"))
#set ($rightsObject = $myspace.newObject("XWiki.XWikiGlobalRights"))
I would use
#set ($rightsObject = $myspace.createNewObject("XWiki.XWikiGlobalRights"))
#set ($result = $rightsObject.set("levels",
"view,edit"))
#set ($result = $rightsObject.set("users", $newuser))
##set ($result = $rightsObject.set("allow", 1))
$mydoc.save()
#end
Hope this helps
Jean
--
----
Jean Couteau
Code Lutin -
http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28