Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev guideRecipesAPI Reference
Dev guideUser GuidesLegal TermsNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Access rights

Describes how to control access for content displayed in search results.

Access right filtering of search results

When integrating Optimizely Search & Navigation with Optimizely Content Management System (CMS), the search engine does not filter documents (such as pages or files) according to access rights. However, the return values from the IContent extension methods RolesWithReadAccess and UsersWithReadAccess are indexed. You can use these methods to ensure only users with access rights to the supplied roles or users see the content.

Example:

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

Control access to UI features

Members assigned to the roles of WebAdmins, Administrators, SearchAdmins, and SearchEditors can access the Search & Navigation user interface. Only WebAdmins, Administrators, and SearchAdmins can clear indexes. See Shell module.