Sorry I make a mistake writing the mail the used code is:

Vector XWikiRights = doc.getObjects("XWiki.XWikiRights");
for (Object singleObj : XWikiRights) {
        Object entry = targetDoc.newObject("XWiki.XWikiRights");
        entry.set("groups",singleObj.getProperty("groups").getValue());
        entry.set("users",singleObj.getProperty("users").getValue());
        entry.set("level",singleObj.getProperty("level").getValue());
        entry.set("allow",singleObj.getProperty("allow").getValue());
}
targetDoc.save();

I try to use something like
 targetDoc.set("groups", singleObj.getProperty("groups").getValue());

withteh same result ... the rights on targetDoc aren't set.

Thanks a lot
Raffo
-- 
View this message in context: 
http://www.nabble.com/copy-the-rigths-tp15003379p15213355.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to