Hi,
I have tried to modify my user rights with REST API by sending these datas on a specific space :
className=XWiki.XWikiGlobalRights&property#levels=view,edit&property#users=XWikiMyUser&property#allow=1
But it is not working with this classname, it only works with XWiki.XWikiRights.
How can I give rights to a user on a page and its child pages using REST API ?
Thanks.
mflorea
2
Global rights have no effect unless they are stored on a preference page. Suppose you have a page A.B.WebHome
(you see it as A / B in the breadcrumb). You need to create the A.B.WebPreferences
page to store the global rights (note that this one is a terminal page). See https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/ContentOrganization/#HTerminology .
I have verified that I could view the WebPreferences page from page “A” and page “A.B”, both are working.
I tried to set the rights again by REST and I still couldn’t see the rights affected to the user.
mflorea
4
Are you sending the post/put REST request to the WebPreferences page? Is the WebPreferences page modified after the REST request?
I was sending to WebHome, changing it to WebPreferences worked.
That’s perfect, thank you very much