Versions Compared

Key

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

...

Goal

The Sitefinity connector provides you with the options to a mechanism which can filter the autocomplete and search results by the permissions of the current user. This allows you to show or hide particular content depending on the user’s role(s).

Prerequisite

Configuration:

You can turn this feature on and off in the widget designers of the Hawksearch widgets:

Image RemovedImage Removed

Functionality:
When filtering is turned on in the HawksearchBox and the Hawksearch widgets the search and autocomplete requests are rerouted to the connector. There each request has the permissions of the user who made the request evaluated. Afterwards by using the permissions of the user the list of results is filtered according to them and after that returned back to user.

Workflow:

...

Info

Configured Hawksearch - Configure Hawksearch

Steps to configure filtering by permission

  1. Open or create a Sitefinity page

  2. Place the Hawksearch box and Hawksearch results widgets

  3. Open the widget designer of each widget and click the checkbox

Image Added

Filtering by permissions workflow

Info

When filtering is active the connector exposes endpoints for the search and autocomplete queries making it work as a proxy.

  1. Searching and typing trigger the connector’s endpoints

  2. A server-side call to the Hawksearch API is made which returns the result for that request

  3. The user’s permissions are evaluated and used to filter the results server-side

Important note

Info

By filtering the results on the server nobody will be able to intercept the request client-side and see the results before they were filtered.

4.After the filtering is completed the results are displayed to the user though the Hawksearch result widget