It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

@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>';

 

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 Jan 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.

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
Jiri Hronik Atlassian Team Mar 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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

How To: get the most out of the new Confluence navigation and Home

Hi Community, Elaine again from Confluence Cloud Product Management. Most of you have used the new Confluence navigation and Home for some time by now. Not sure what changed or just want to lear...

480 views 3 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you