[xwiki-users] Question on a snippet from codezone
I saw this code snippet for setting rights on a page. Does someone know the equivalent for setting the right on the space. How to get the space object(something equivalent to the first line in the snippet) http://code.xwiki.org/xwiki/bin/view/Snippets/SettingRightsSnippet thanks. sharan.
hi Sharan, the rights objects that define the access in a space are stored in the Space.WebPreferences document (where Space is the space you want to set the rights for). Happy coding! Anca Luca Sharanabasavaraj Mudgal wrote:
I saw this code snippet for setting rights on a page. Does someone know the equivalent for setting the right on the space. How to get the space object(something equivalent to the first line in the snippet)
http://code.xwiki.org/xwiki/bin/view/Snippets/SettingRightsSnippet
thanks. sharan.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Anca Paula Luca wrote:
hi Sharan,
the rights objects that define the access in a space are stored in the Space.WebPreferences document (where Space is the space you want to set the rights for).
And, as the comments in the snippet indicate, be sure to use XWiki.XWikiGlobalRights instead of XWiki.XWikiRights.
Sharanabasavaraj Mudgal wrote:
I saw this code snippet for setting rights on a page. Does someone know the equivalent for setting the right on the space. How to get the space object(something equivalent to the first line in the snippet)
http://code.xwiki.org/xwiki/bin/view/Snippets/SettingRightsSnippet
-- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (3)
-
Anca Paula Luca -
Sergiu Dumitriu -
Sharanabasavaraj Mudgal