Changes for page Extended Group API
Last modified by Admin on 2021/03/17 21:21
From version 2.7
edited by Admin
on 2016/03/09 00:06
on 2016/03/09 00:06
Change comment:
Imported extension [org.xwiki.contrib.usergroup:api-usergroup] from repository [maven-xwiki:maven:http://nexus.xwiki.org/nexus/content/groups/public]
To version 3.1
edited by Clemens Robbenhaar
on 2016/04/13 12:58
on 2016/04/13 12:58
Change comment:
very, very simple example
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. Admin1 +xwiki:XWiki.ClemensRobbenhaar
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -1,1 +1,16 @@ 1 1 List of groups and subgroups that the current user or group is member of 2 + 3 +=== Simple usage example === 4 + 5 +{{code}} 6 +{{velocity}} 7 +## get reference to a user 8 +#set($userRef = $xwiki.getDocument("xwiki:XWiki.Admin").getDocumentReference()) 9 + 10 +Groups of user $userRef: 11 +## list all groups (return values are strings, actually) 12 +#foreach($groupName in $services.userGroup.getGroups($userRef, true, true, true)) 13 +* $groupName 14 +#end 15 +{{/velocity}} 16 +{{/code}}