Description:
The connector provides you with the options to 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).
Configuration:
You can turn this feature on and off in the widget designers of the Hawksearch widgets:
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:
If filtering is active in the widgets when the page loads the url’s for the search and autocomplete requests will be changed in order for the them to pass through the connector making the connector work as a proxy. When someone starts typing in the search box a request is made to the connector. In it by using the Hawksearch client all of the result for that autocomplete query are gathered. Afterwards the permission for the user who made the request are used to filter out all of these result in order to remove the documents which are not permitted to be seen. When all of the results have been filtered the final autocomplete result is sent back to the user. The process for searching is identical - when the user makes a search request it is rerouted to the connector where the user’s permissions are evaluated and used to filter out the search results in order to remove those which the user is not allowed to see. When the filtering is finished the results are displayed to user.