This content is archived. See latest version here

Last updated: Nov 16 2015

This topic describes access rights filtering when Episerver Find is integrated with Episerver 7/7.5 CMS.

How it works

The search engine does not filter documents (such as pages or files) according to access rights. But, if you integrate Find with the Episerver CMS, the return values from the IContent extension methods RolesWithReadAccess and UsersWithReadAccess are indexed. Use these methods to filter content that the current user does not have permission to see.

Example:

C#
SearchClient.Instance.Search<StandardPage>()
    .For("Possibly secret stuff")
    .Filter(x => x.RolesWithReadAccess().Match("Everyone"))
    .GetContentResult();

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/