Setting Rights Snippet
Show how to set up rights programmatically using VelocityCode
#set ($mydoc = $xwiki.getDocument("Space.Page"))
## Create a rights object and attach it to the Space.Page page
#set ($rightsObject = $mydoc.getObject("XWiki.XWikiRights", true))
## Set the values of the fields
#set ($result = $rightsObject.set("groups", "XWiki.XWikiAdminGroup"))
#set ($result = $rightsObject.set("levels", "edit"))
#set ($result = $rightsObject.set("users", ""))
#set ($result = $rightsObject.set("allow", 1))
## Save the modifications
$mydoc.save()
Version 2.2 last modified by Sergiu on 07/01/2008 at 23:29
Document data
Attachments:
No attachments for this document
Comments: 0