Hi,
I'm trying make plugin that allows changing rights of parent page and automatically
changes rights of its children pages. Now, this plugin is almost working, it is really
changing the rights of all pages. But when I select Edit-> Page Access Rights then
there are no icons in the rights editor showing rights of users and groups for this page.
I have found that when I change rights using the plugin for example for page Main and
group called Folks, then in Edit->Objects->XWiki.XWikiRights in the Groups fields
there are two items called "Folks" (but actually just one group Folks exist). So
I think this is the problem, but I have no idea what I'm doing wrong... Can you help
me? Thanks a lot
Here is the part of java code in plugin:
XWikiD
BaseObject objekt = doc.getObject("XWiki.XWikiRights",true, context);
objekt.set("users", "", context);
objekt.set("levels", "edit", context);
objekt.setStringValue("groups", "Folks");
// objekt.set("groups", "Folks",context); this makes no difference
objekt.setClassName("XWiki.XWikiRights"); // probably useless
objekt.set("allow", 1, context);
try{
context.getWiki().saveDocument(doc, context);
}catch(Exception a){}
--
View this message in context:
http://n2.nabble.com/How-to-change-rights-correctly-in-java--tp2575044p2575…
Sent from the XWiki- Users mailing list archive at
Nabble.com.