Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

SearchDataSource PageHits always have ACL set to Everyone,FullAccess

Vote:
 

Hi

 Im working on a slightly modified search page. In the search result I want to display an icon for pages and files if not the role "Everyone" has read access. Got it to work for pages no problem but I discoverd that for filehits the pageData.ACL is always set to Everyone with fullaccess.

Could I use the PageLinkURL property and parse out the file name and do a check on the actual folder?

 If it's possible to set the correct ACL for pagehits in the searchdatasource with not to much of a hassle and performance issues I think it would be a nice feature for the next release.

 Br

 Per N 

 

#27074
Jan 16, 2009 9:21
Vote:
 

I can answer my own question.

If you filter out the document name from the pageData.PageName you can do something like this:

try{

UnifiedDirectory directory = HostingEnvironment.VirtualPathProvider.GetDirectory(path) as UnifiedDirectory;

return directory.ACL.QueryDistinctAccess(PrincipalInfo.AnonymousPrincipal, AccessLevel.Read);

}

catch (UnauthorizedAccessException ex)

{

return false;

}

#27177
Jan 19, 2009 16:37
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.