Grettings ! I need to get a list of users who have restrictions on accessing the pages in confluence by querying the database. what table does this data contain?
The table you are looking for is called CONTENT_PERM.
Column name | Description----------------------------------------------------ID | table primary keyCP_TYPE | type of page restriction (View or Edit)USERNAME | foreign key to the user_mapping table either this or GROUPNAME will be setGROUPNAME | either this or USERNAME will be setCPS_ID | foreign key to the CONTENT tableCREATOR | foreign key to the user_mapping tableCREATIONDATE | creation dateLASTMODIFIER | foreign key to the user_mapping tableLASTMODDATE | last modification date
Hmm.. why using DB? You can list all restrictions by going to Space Admin > Restricted Pages on each space that you are interested in.
Hi Theyoba,
Here is the link the the Confluence DB.
I don't see permissions based on pages, it is more space level.
We have to get space admins used to grant access to pages by group and not by individuals. I am fighting for it right now in my company
User will need to use a join with another table so that he can get the username. Username in CONTENT_PERM table displays as numbers
It shows the group name but not individuals.
Thank you very much ! One more question, please.
How i can join it to normal view.
Like
GROUPNAME | USER
Is ID`s in table = ID`s in table cwd_user ?
In the above answer I put in the description section the tables that the foreign keys map to.
@Davin Studer thank a lot ! I did it !
If you are looking for a particular users' restricted pages -
select * from CONTENT where CONTENTID in ( select CONTENT_ID from CONTENT_PERM_SET where ID in (select CPS_ID from CONTENT_PERM where USERNAME in (select user_key from user_mapping where lower_username like "lower.username")));
I am looking for a way to list ALL restricted pages in ALL spaces in order to understand what we have to possibly add in an admin group to fix any broken macros post-migration in those restricted pages.
It looks like you're new here. Sign in or register to get started.