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.

...

Steps to configure filtering by Permissions

  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- Sitefinity permissions overviewsite-domain/Sitefinity/Administration/Users)

  3. Assign that the user a role by editting the user profile or by click Assign to rolethe 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 a certain content type e.g News

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

  7. the News article you created

  • In the right side menu on the News page open Set permissions

  • Under who can view news press Change

  • Check the advanced checkbox and add the role(s) you wish to deny

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

10 .Login as the newly created user

11. Open the page in the

...

frontend and search for the

...

Note

If you have an existing index it is not necessary to create a new one.

...

content you created - it should not be visible

How it works

...

Search Workflow

...

  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 end Sitefinity makes a server-side call to the Hawksearch API with the following parameters :

...

  • Client ID, Index name, Keyword, Page number, Sort By, Boost and Bury etc.

  • Query - contains the current user roles

3. The Hawksearch API then responds with a set of results depending on the parameters sent

...