How to check permissions for a specific page via SQL queries

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

It may be helpful to check the permissions of a specific page to verify what is being reported in the UI or an administrator may want to generate this information from the database for reporting purposes

Solution

The below query will give an output of all permissions on a given page. Just replace <page title here> with your exact page title

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



Last modified on May 15, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.