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 Hawksearch Settings: Administration → Settings → Hawkseatch Hawksearch and check if the Filter By Permission is on. If not, please select itselect Filter By Permissions checkbox.

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

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

  4. Assign the user the newly created role

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

  6. 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

8. Open the widget designer of each widget and click the Filter by permissions checkbox

9. Under Where to search? choose the newly created index and save the changes

...

  1. Typing in the search box sends a request to Sitefinity’s autocomplete endpoint, searching sends a request to Sitefinity’s search endpoint.

  2. On it’s its end Sitefinity makes a server-side call to the Hawksearch API with the following parameters :

...

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 and / or the user id 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.

Documents are having permissions field with the ids:

...

  • Paging

The paging is done on behalf of Hawksearch and depends on the following parameters that Sitefinity sends : page number, max results per page, sort by. Hawksearch then uses there parameters to return the correct set of results.

...