This content is archived. See latest version here

Last updated: Apr 03 2014

Introduction

This document describes access rights filtering for an integration with EPiServer 7/7.5 CMS. The search engine does not apply any access rights filtering for documents such as pages or files. However, when using the EPiServer CMS integration, the return value from extension methods for IContent named RolesWithReadAccess and UsersWithReadAccess will be indexed. This means that we can filter out content that the current user should not be able to see.

Examples

An example of filtering using RolesWithReadAccess:

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/