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'm an admin and control access to a few spaces. We restrict areas within spaces to a smaller group of users. I use groups to control access at the space and page level.
What I would like to accomplish is to display on the restricted page exactly who has access (including a breakout of all group members, not just the group name) to create transparency and build confidence in the selected user group that they are posting in the appropriately restricted area.
Looking at restrictions takes time, and I don't know if there is any easy way for non-admin users to see who is in a group.
Trying to create some transparency. A widget like the "children pages display" would be ideal, as this doesn't require code and is super easy to use.
Thanks for advice.
Hello:
Here's a basic Confluence user macro I put together. It lists out the users with individual permissions, and then the groups with permission and the users in the groups:
## @noparams
#set($permissions = $content.permissions)
#set($userNamesArray = [])
#set($groupNamesArray = [])
#foreach ($permission in $permissions)
#if($permission.userSubject && $permission.userSubject.name && !$userNamesArray.contains($permission.userSubject.name))
#set($unused = $userNamesArray.add($permission.userSubject.name))
#end
#if(!$permission.userSubject.name)
#if(!$groupNamesArray.contains($permission.groupName))
#set($unused = $groupNamesArray.add($permission.groupName))
#end
#end
#end
<h3>Users With Page Access</h3><br>
#foreach ($userName in $userNamesArray)
$userName<br>
#end
#foreach ($groupName in $groupNamesArray)
##Start group-loop
<h3>Groups With Page Access:<br>
<b> $groupName</b></h3><br>
#set($group = $userAccessor.getGroup($groupName))
#set($members = $userAccessor.getMemberNames($group))
Group Members:<br>
#foreach($member in $members)
$member <br>
#end
##End group-loop
#end
The output on the page looks like this:
admin
jsmith
Group Members:
admin
jsmith
Hi Ken,
Appreciate your answer. I’m a dummy and don’t mess around with macros, but I guess I could try it.
I was really hoping there was a widget (like the child pages widget) available that I just hadn’t found that would make this super easy.
Maybe atlassian will turn your macro into a widget for us dummies one day!
Thanks for your help.
Jake
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.