London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Navigation [hide] [expand]
Area: Optimizely Search & Navigation
ARCHIVED This content is retired and no longer maintained. See the latest version here.

Introduction

The search engine does not implement any access rights filtering for documents (pages, files etc). However, when using the EPiServer CMS integration, the return value from an extension method for PageData named RolesWithReadAccess will be indexed. This means that we can filter out pages that the current user should not be able to see.

Examples

Filtering out results using RolesWithReadAcess:

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

Last updated: Jun 10, 2014