I use the following code to grant Delete right by default (I execute this
java code on xwiki start):
XWikiContext context = contextProvider.get();
if (context != null) {
XWiki xwiki = context.getWiki();
DocumentReference dr = new DocumentReference("xwiki",
"XWiki", "XWikiPreferences");
XWikiDocument doc = xwiki.getDocument(dr, context);
BaseObject bo = doc.getObject("XWiki.XWikiGlobalRights",
true, context);
bo.set("groups", "XWiki.XWikiAllGroup", context);
bo.set("levels",
"view,comment,edit,delete,script",
context);
bo.set("users", "", context);
bo.set("allow", 1, context);
xwiki.saveDocument(doc, context);
}
I have strange effect: while I do have Delete right by default, documentTree
macro doesn't work, I see spinning circles. I also have the following
message in the xwiki terminal:
Exception in macro #handleDocumentTreeRequest called at
13:xwiki:XWiki.DocumentTree[line 3, column 1
<http://xwiki.475771.n2.nabble.com/file/n7599540/xwiki_problem.jpg>
How to fix the problem?
--
View this message in context:
http://xwiki.475771.n2.nabble.com/documentTree-macro-doesn-t-work-after-add…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.