Macro to get all Page Restriction for a specific Group

Hi All,

Guys there is a macro what will display all restriction associated with group ??

I mean for example you have a XXX group and type it intro plug in then got reply group XXX has page restriction at following space : ... 

 

Thanks in advice.

3 answers

1 accepted

Hey @Marcin Wilczynski,

I've wrote simple query that will give you the page title, space name, group name and restriction type that the specific group have in Confluence:

select c.TITLE AS "Page Title", s.SPACENAME as "Space Name", cp.GROUPNAME as "Group Name", cp.CP_TYPE as "Restriction Type"
from CONTENT_PERM cp
inner join CONTENT_PERM_SET cps on cp.CPS_ID = cps.ID
inner join CONTENT c on c.CONTENTID = cps.CONTENT_ID
inner join SPACES s on c.SPACEID = s.SPACEID
where cp.GROUPNAME = 'secret-group';

Notes: 

  1. You need to change the secret-group in above query with the name of the group you want to check the restrictions.
  2. The above query was written on MS SQL Server, in case it fails in your DBMS let us know which one you use.
Thanks and Regards,
Lavitz - the guy that uses Confluence on Windows as a Hobby!

 

Thanks man you save my day :)

Hey Marcin,

There's a user macro that user @Andrew Frayling wrote that list all the groups of each space and it's permissions:

https://answers.atlassian.com/questions/50804/group-permissions-in-confluence?page=1

I did not tested but it might be a direction to achieve what you want.
Thanks and Regards,
Lavitz - the guy that uses Confluence on Windows as a Hobby!
Hi Lavitz

Thanks for your comment, I'm looking for macro what show page restriction instead of permission.

Regards.

In confluence, the term, page restriction is meant to say, group x is the one that have "permission" to view and edit this page/space. However if a page don't have any restrictions applied all groups will be shown by that macro. I will try to write down a sql query to show all pages and spaces that have being restricted to a specific group in case no one shows up a better solution.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,888 views 25 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you