How to know the number of users with access to a page

Gustavo Tejo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2024

Hi. Through SQL I need to know how many users have access to a page.

 

Screenshot 2024-11-14 at 17.24.45.png

In this example, there are 70 users with access, but I need to retrieve that data through SQL.

Confluence 8.5.11 version

 

Thanks in advance.

1 answer

0 votes
Jim Knepley - ReleaseTEAM
Atlassian Partner
November 14, 2024

Hi @Gustavo Tejo, welcome to the community.

This query doesn't return counts, but you could either adapt the query or post-process the results.

SELECT u.username , c.cp_type , c.creationdate , c.lastmoddate
FROM content_perm AS c
JOIN user_mapping AS u
ON c.username = u.user_key
WHERE c.cps_id in (SELECT id FROM content_perm_set WHERE content_id in (SELECT contentid FROM content WHERE title= '<page title here>'
ORDER BY version DESC LIMIT 1));

I'm unclear if that will include counts of users who are members of groups granted access.

 

ref: https://confluence.atlassian.com/confkb/how-to-check-permissions-for-a-specific-page-via-sql-queries-946627309.html

 

Gustavo Tejo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2024

Hi

 

SELECT u.username , c.cp_type , c.creationdate , c.lastmoddate

FROM content_perm AS c

JOIN user_mapping AS u

ON c.username = u.user_key

WHERE c.cps_id in (SELECT id FROM content_perm_set WHERE content_id in (SELECT contentid FROM content WHERE title= '[BFCO][APP] Integración con AZ Digital DC MVP1'

ORDER BY version DESC LIMIT 1));

 

Total rows: 0

 

Table Content_perm_set not matching with content

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events