Last modified by Vincent Massol on 2006/12/10

Question How to add user into group from groovy.
Answer Q: I tried to simply create new XWikiGroups object in document XWiki.MyGroup and set the member field properly, but this user does not gain the group rights then.

A: You need to use the priviledge API to do this. This is currently only possible on your own XWiki installation and not on

To do this on your own installation, you need to do this using an admin user (or a user having the programming right) and access the underlying document:

privdoc = doc.getDocument()

Then add a XWiki.XWikiGroups object to the privdoc document using addObject in the main XWiki doc API

Created by Caleb James DeLisle on 2005/11/02

Get Connected