Evan Pease wrote:
Hi,
Is there a way to add users and manipulate permission via the XWiki
API?
Can someone point me to documentation on how to do it (if it exists)?
The basic way is to use the plain Object manipulation API, since all
users and rights are normal XWiki Objects.
You should read:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel
http://platform.xwiki.org/xwiki/bin/view/DevGuide/API
For creating users, a helper method is com.xpn.xwiki.createUser(String
xwikiname, Map map, String parent, String content, String userRights,
XWikiContext context) (no javadoc, you should look directly at the
code
to see what it does).
For manipulating rights I am afraid there are no helper methods to set
rights, but there are a few to check rights, see in the XWiki API
class.