You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I want to generate a report that shows a listing of all groups in our Confluence instance. Anyone done anything like this?
Thanks!
You could do it with a user macro.
## Developed by: Davin Studer ## Date created: 04/21/2015 ## @noparams <ul> #foreach($group in $userAccessor.getGroups()) <li>$group</li> #end </ul>
Nice one, Davin! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just in case the special characters in Davin's script causes issues like they did for me - this slightly changed version worked flawlessly for me (Confluence version 6.4):
## Developed by: Davin Studer
## Date created: 04/21/2015
## @noparams
<ul>
#foreach($group in $userAccessor.getGroups())
<li>$group</li>
#end
</ul>
Thanks, @Davin Studer. Awesome little script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, unfortunately when these posts were migrated from the old Atlassian Answers site the code blocks were html encoded, which messes up the code. : (
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bob,
You can get a list of all group names by running a query against your database. For instance:
select group_name from cwd_group;
It's also possible to retrieve the directory name that this group comes from and other kind of information you might need.
Let me know if that helps!
Eduardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
similarly from the java api
public class MyClass extends ConfluenceActionSupport{ private final UserAccessor useraccessor; public MyClass(UserAccessor userAccessor){ this.useraccessor=userAccessor; } public String execute() { //do something with useraccessor.getGroups() } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.