So a quick solution for this is to make a page that users can go to, that will display all of the folders and documents they have access to, like below:
This is just a page with two Search Content web parts, and a new Display Template. For the Display Template:
- First make a copy of the Item_TwoLines.html file on the site collection you're in, and name it something else, e.g. Item_UserAccess.html.
- Change the title to "User Acces":
- Replace the mso:ManagedPropertyMapping line with the following:
<mso:ManagedPropertyMapping msdt:dt="string">'Link URL'{Link URL}:'Path','Line 1'{Line 1}:'Title','Line 2'{Line 2}:'Title'</mso: ManagedPropertyMapping>
- You can then update the content in the display template by replacing the cbs-item div with the following:
<div class="cbs-Item" id="_#= containerId =#_" data-displaytemplate=" Item2Lines">
<div class="cbs-Detail" id="_#= dataContainerId =#_">
<h3>_#= line1 =#_</h3>
<!--#_
if(!line2.isEmpty)
{
_#-->
<div class="cbs-Line2 ms-noWrap" title="_#= $htmlEncode(line2. defaultValueRenderer(line2)) =#_" id="_#= line2Id =#_">
<a class="cbs-Line1Link ms-noWrap ms-displayBlock" href="_#= linkURL =#_" title="_#= $htmlEncode(line1. defaultValueRenderer(line1)) =#_" id="_#= line1LinkId =#_">_#= line2 =#_</a>
</div>
<!--#_
}
_#-->
</div>
</div>
- Once these changes are made, save your file.
- Then go to Site Settings -> Master pages and page layouts -> Display Templates -> Content Web Parts -> Item_UserAccess.html and select "Publish a Major Version"
Next, add a Search Content web part, change the query text to:
For Folders
Path:"https://yoursite.sharepoint.com/teams/teamsites/" -Path:"https://yoursite.sharepoint.com/teams/teamsites/SiteAssets/" ContentTypeId:0x0120* -ProgID:OneNote.Notebook -ContentTypeId:0x012002* -ContentTypeId:0x012000C0* -ContentTypeId:0x0120001928*
Where the ContentIDs above are bringing back folders, excluding OneNote Notebooks and MicroFeed folders. And we're excluding SiteAssets which generally most everyone has access to.
For Documents
Path:"https://yoursite.sharepoint.com/teams/teamsites/" -Path:"https://yoursite.sharepoint.com/teams/teamsites/SiteAssets/" ContentTypeId:0x010100*
Next update the items to show, change the Display Template to "List with Paging" and your new display template "User Acces":
And that should be it!