Hi,

On Thu, Apr 2, 2009 at 15:06, ladar <[email protected]> wrote:
>
> 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

I think you are supposed to put the full group identifier (Space.Page)
in the right object and not just the page name. So in your case I
suppose it's "XWiki.Folks" instead of "Folks"

>
> 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--tp2575044p2575044.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Thomas Mortagne
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to