Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

List users who have access to confluence page

Brian Engert September 12, 2013

We tend to use a combination of space level and page level access on our confluence instence. When permission is granted based on a user it's easy to see who has access to something but it's not as easy when it's granted to a group. Is there a way to get a list of users who has access to view a page?

11 answers

0 votes
Justin Shepard
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!
October 16, 2019

This article may be of interest to folks:

How to list which spaces a user can access

https://confluence.atlassian.com/confkb/how-to-list-which-spaces-a-user-can-access-321258272.html

0 votes
Peter Andersen
Contributor
October 24, 2017

I really would like this functionality too. Has anyone proposed it at https://jira.atlassian.com/projects/CONFSERVER ?

0 votes
Patrick van der Rijst
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2017

Great answer yet indeed very slow when you have many users in your system. Isn't there an add-on that can show it paginated?

0 votes
Brian Engert September 29, 2013

I was able to write a macro that does what I want but it's slow because it goes through every user in confluence. I have not found a good way to see who has access to a space so I could check fewer users but this also lists system admins (something I want).

## @noparams

Users with view Permission
<ul>

##iterate over all view contentpermissionssets
#foreach( $user in $userAccessor.getUsers() )

#if($permissionHelper.canView($user,$content) )

##if yes print the name
<li>$user.getFullName()</li>
#end
#end
</ul>

0 votes
Brian Engert September 24, 2013

Matthew thanks for the responce but that seems to only list users who were granted on the page but not users in any groups.

0 votes
Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2013

I was trying to get at what you really wanted. I think this would return what you want (essentially, a list of users who can access the page):

#set($permsList = $content.permissions)

#foreach($item in $permsList)

#if ($item.userName)

$item.userName <br/>

#end

#end

From what I understand, you can ignore the groups, because this will return a list of only users who can access the page, regardless of their group membership.

0 votes
Brian Engert September 12, 2013

Matthew that about sums it up but you do need to worry about the space permissions because if someone does not have access to a space they still won't be able to access the page.

group a

  • user 1
  • user 2

group b

  • user 2
  • user 3

If the space is set to only let group a access the space and the page is set to only let group b access the page then only user 2 would be able to access the page. What I'm looking for is a easy to way display on the page what users have access to view the page.

Judging by the lack of other responces I'm guessing I would need to write a plugin to acheave what I want.

0 votes
Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2013

Ok, lemme pseudocode this out, then you tell me if that's what you're looking for:

// get groups that can view a particular page

// get users that can view that page but that are not in the groups list

// list group members of groups that can use page

// list users that can view page

You don't have to look at the space-wide permissions because each individual page will inherit those settings if they don't override them.

0 votes
Brian Engert September 12, 2013

I want a list of users who can view a page. an example would be If the space grants access to group a and user 1 but a page restricts reading to group c and user 1 then I want a list of users who are in both a and c along with user 1. This becomes a lot more complex as you go down the tree as the permissions on parent pages would impact the child page as well.

0 votes
Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2013

So, you want a list of users in a group?

Brian Engert September 12, 2013

That is to log who has accessed a page not who has permission to access a page.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events