Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User Macro - list groups per space

Bernard March 21, 2022

Hi all,

I'm trying to automatically list all groups attached to a particular space using a User Macro.

Been searching in the community and in classes descriptions to find information but i cannot find this class or function. 


Can i

Can it be done? Can you please point me in the right direction?

Thanks in advance.

 

Regards,

Bernard

 

 

1 answer

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2022

Hello @Bernard , not sure what you mean by a group being attached to a particular space. 

Bernard March 21, 2022

In a space (spacetools) under access you can attach user groups for particular persissions.

I want to list the names of these these groups for a given spacekey

Capture.JPG

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2022

So you are wanting this for the entire Confluence instance, a list of permissions for each space?

Maybe a plugin such as this one would do what you want to: https://marketplace.atlassian.com/apps/1214087/space-admin-for-confluence?hosting=server&tab=overview 

Bernard March 22, 2022

Hi Bill,

As i mentioned in my first post " a particular spacenot systemwide.

I can query users in a particular group via a user macro.

Now just wat to list the "user" groups attatched to a space.

 

So i get this via a user macro: 

(query groups in for a given space)

group name 1

 - user

 - user

group name 2

 - user

- user

Bernard March 23, 2022

can this be done? 

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2022

Well, it won't be 100%, but you could generate a list of all pages in the space, then query who was the creator, and who last modified the page, then query what groups those user belong to, and resort. Of course you will have situations where a single user belongs to two groups.

Or you can run this orthogonally, and list all groups, then their users, displaying only those who have edit permission for example.  Here is a snippet of code I found:

#if ($permissionHelper.canEdit($authenticatedUser, $action.page)) <b>You have Edit Permission for this Page</b> #end

But it would take some work to develop and test this macro, not sure the ROI is there when any space admin can just view the permissions.

Like Bernard likes this
Bernard March 24, 2022

Thanks for the reply @Bill Bailey  :) :) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events