Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Search for pages restricted to a user

Anne EQS
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.
November 5, 2015

Is there any way to search for all content (pages and blog posts) for which a defined user has viewing and/or editing rights for a complete confluence instance?

I know about the space admin function but what I'd need is a search string to serach for all contnetn tah user xyz has viewing or editing rights (of course minus the ones every user has rights for)

1 answer

1 accepted

1 vote
Answer accepted
Tim
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.
November 10, 2015

It is possible to get the information with a user macro. Here is a similiar one, which lists all pages in every space having group permissions:

## @noparams
#set ( $pageManager = $action.getPageManager() )
 
#set( $allSpaces = $spaceManager.getAllSpaces() )
 
<table class="confluenceTable"> 
    <tr>
      <th class="confluenceTh">Space</th>
      <th class="confluenceTh">Page</th>
      <th class="confluenceTh">Group Permission</th>
    </tr>
#foreach($space in $allSpaces)
    #set( $allPagesInSpace = $pageManager.getPages($space, true) )
    #foreach($page in $allPagesInSpace)
      #if($page.hasContentPermissions())
        #set( $permissions = $page.getPermissions() )
        <tr>
          <td class="confluenceTd">$space.name</td>
          <td class="confluenceTd">#contentLink2($page false false)</td>
          <td class="confluenceTd">
            <ul>
              #foreach($permission in $permissions)
                #if($permission.isGroupPermission())                
 <li><em>$permission.type</em> to
<strong>$permission.groupName</strong></li>
                #end
              #end
            </ul>
          </td>
        </tr>
      #end
    #end
#end
</table>

It can be adapted with minimal effort to work for blogpost and userPermissions as well. Be advised, that depending on your server hardware and size of your Confluence instance, running these kinds of macros will put the system under heavy load for quite some time, so use with caution or on a separate test server.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events