<http://xwiki.475771.n2.nabble.com/file/n7599471/xwiki_problem.jpg> 
I have the following problem: Exception in macro #handleDocumentTreeRequest
called at 13:xwiki:XWiki.DocumentTree[line 3, column 1 What rights I need to
add? I set view,comment,edit,delete,script rights. I use the following code:

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);
                }



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/How-to-grant-Delete-Right-for-all-registered-users-via-java-API-tp7599456p7599471.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to