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, create a user (your-site-domain/Sitefinity/Administration/Users)

  2. Assign that user a role by editting the user profile or by click Assign to role

  3. Edit the permission for that role so that the user cannot view a certain content type e.g News

  4. Go to Content and create one blog post and one news (your-site-domain/Sitefinity/adminapp/content/newsitems)

  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 editting (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

  10. Open the page in the Frontend and search for the news that was created

...

Hawksearch doesn’t hold the user’s role data so the filtering by permission is done on behalf of Sitefinity. When the Hawksearch API returns a set of results, Sitefinity checks the current user’s identity and all of the roles that are assigned to him. Then for each result that the Hawksearch API sent Sitefinity checks whether the current user is granted permissions to see it, if not that result is removed. When all of the results have been checked the final result set is sent to the Hawksearch widgets.

  • Paging

...