Hi,
On Mon, Mar 31, 2008 at 4:45 AM, Glenn Everitt
<Glenn.Everitt(a)compuware.com> wrote:
I've got existing groups of users in a proprietary system and I want to
automatically create a new XWiki user and if this is the first user in the
group I want to create a XWiki Space and an XWiki group. Finally, I want to
authorize the XWiki Group within the XWiki Space.
I can create the user similar to the CreateUserFromLDAP and I can create a
group by creating a new XWikiDocument and adding a GroupClass object to it.
Then I can add the user into the group by using
XWikiGroupService.addUserToGroup. Next, I can create the space using
SpaceManagerPluginApi.createSpace but I don't know how to give the group
justed added rights in the space just added.
I think I should use Xwiki.XWikiRights and Xwiki.XWikiGlobalRights but I
can't figure out how to do this.
I want to give Access Level rights to the added Group for the added Space.
Look at
http://code.xwiki.org/xwiki/bin/view/Snippets/SettingRightsSnippet
for an example of how to configure a XWiki.XWikiRights (same as
XWiki.XWikiGlobalRights but on different scope) object.
For you particular case you should edit <Space>.WebPreferences (where
are listed space rights) and edit/add XWiki.XWikiGlobalRights (because
you want to "globally" configure <Space> and not configure just
<Space>.WebPreferences document).
It would be great if someone could point me to an example or explanation of
how to use XWikiRights.
Help is always appreciated.
Thanks
Glenn Everitt
--
View this message in context:
http://www.nabble.com/How-can-I-dynamically-add-group-rights-to-a-space--tp…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne