Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Goal

This article provides information about the functionality, configuration and workflow behind the filter by permissions feature of the Sitefinity connector.

...

  1. Open the Sitefinity backend and create a role under (your-site-domain/Sitefinity/Administration/Roles)

  2. Open the Sitefinity backend, create a user under (your-site-domain/Sitefinity/Administration/Users)

  3. Assign the user the newly created role

  4. Go to Content and create one blog post and one news article

  5. Edit the permission for that role so that the user cannot view the News article you created

...

5. Go to Administration → Search Indexes , create an index and reindex (your-site-domain/Sitefinity/Administration/Search)

6. Create a Sitefinity page and open it for editing (your-site-domain/Sitefinity/adminapp/pages)

7. Place the Hawksearch box and Hawksearch results widgets

...

11. Open the page in the frontend and search for the content you created - it should not be visible

Info

The Hawksearch config exposes a checkbox which specifies whether permissions and denials fields should be added to each document that is being indexed. These fields specify which user roles are permitted to view the document and which are denied. This checkbox is selected by default.

How it works

...

Search Workflow

...

When the index is created and Filter by Permissions is turned on in the Hawksearch configuration each document is sent with fields specifying users in which roles are permitted to view the document and users in which roles are not allowed to view it. As mentioned in the Search Workflow when a search request is made it contains the roles of the user making the request. Hawksearch then compares these roles with the permissions of each document and determines whether the user can view the document.

...