Any user side tool to see which groups have access to which spaces?

Robert Duffer January 13, 2020

I need a way to see which spaces or pages a group has access to.  Pretty simple request but can't find anything short of SQL to display this.

3 answers

0 votes
Jiri Hronik
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2020

Hi @Robert Duffer ,

there's now a built-in feature in Confluence Data Center for this purpose exactly. See the 7.3 release notes for details: https://confluence.atlassian.com/doc/confluence-7-3-release-notes-983794557.html#Confluence7.3ReleaseNotes-Advancedpermissionsmanagementforeasieradministration

0 votes
Robert Duffer January 14, 2020

A query doesn't help me.  I don't have SQL access to the Db.  I have User Macros.  That is what I meant by user side.  If this could be "translated" into macro code it could serve my need.  Thanks

0 votes
Veera
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2020

@Robert Duffer ,

List all the spaces that the group has been granted permissions with the permission type:

SELECT s.SPACEKEY, sp.PERMTYPE as PERMISSIONS
FROM SPACEPERMISSIONS sp
JOIN SPACES s ON s.SPACEID = sp.SPACEID
JOIN cwd_group g ON sp.PERMGROUPNAME = g.group_name
WHERE sp.PERMGROUPNAME IN
(
SELECT g.group_name
FROM cwd_group g
WHERE g.lower_group_name = '<group_name>'
);

List all the pages that the group has been granted view/edit permissions:

select c.contentid, c.title,c.content_status, s.spacekey, s.spacename, cp.groupname, cps.cont_perm_type
from
content c,
spaces s,
CONTENT_PERM_SET cps,
CONTENT_PERM cp
where
c.contenttype='PAGE'and
c.spaceid=s.spaceid and
cps.content_id = c.contentid and
cp.cps_id=cps.id and
cp.groupname = '<group name>';

 

Nicolai Sibler
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.
January 14, 2020

Thanks for sharing, @Veera

The first query works fine and is very useful.

The second query puts out a table with column headers, but no content...

Like Veera likes this
Veera
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 14, 2020

@Nicolai Sibler

I tested the second query and it works fine for me. In that query, make sure you use the group name in the same way it's showing you in the groups page in the UI, but not all lower case letters.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events