0
でXML-RPCを持つグループに私は新しいグループを作成しようとするが、私はどのようにセット権利日食
私のコードは、私はそれを同じようにやろう
private static void createNewGroup() throws MalformedURLException, XmlRpcException {
XWikiXmlRpcClient rpc = new XWikiXmlRpcClient("http://localhost:8080/xwiki/xmlrpc/confluence");
try {
rpc.login("Admin", "admin");
// this create the group but without permissions
Page page = new Page();
page.setSpace("XWiki");
page.setParentId("XWiki.XWikiGroups");
page.setTitle("XWikiUsersGroups");
page.setId("XWiki.XWikiUsersGroup");
page.setContent("{{include document=\"XWiki.XWikiGroupSheet\"/}}");
rpc.storePage(page);
//no puedo setearle permisos
XWikiObject xobjgrp = new XWikiObject();
xobjgrp.setClassName("XWiki.XWikiGroups");
xobjgrp.setPageId("XWiki.XWikiUsersGroup");
xobjgrp.setId(-1);
xobjgrp.setProperty("levels", "View"); // this not work
xobjgrp.setProperty("allow", true); //not work, too
rpc.storeObject(xobjgrp);
} catch (XmlRpcException e) {
System.out.println("invalid username/password was specified or communication problem or ");
System.out.println(e);
} finally {
rpc.logout();
}
}
で設定されたアクセス権をカントユーザーは作成されていますが、権限を割り当てることはできません。
http://platform.xwiki.org/xwiki/bin/view/Features/XMLRPCJavaExamples#HUser:CreateANewUser
ヘルプ!
http://platform.xwiki.org/xwiki/bin/view/Features/XMLRPCJavaExamples#HUser:CreateANewUserは権限を割り当てていないため、作成したユーザーをXWikiAllGroupグループに追加するだけです。 –