Filtering Examine search results by members access rights
Hi all,
I have a web site setup with Umbraco (v7.7.7). There are about 3K content nodes, 1K members and about 70 member groups. Each member is assigned at least one member group and all content is protected by the use of nested Public Access areas (anonymous access is not supported).
The web site also provides a search functionality that is powered by Examine/Lucene and works fine in terms of returning the (correct) search results.
What I need to do is filter the search results based on the logged on member's access rights so as to display only the search results that are actually accessible to the member, taking into account the member groups that are assigned to the logged on member and the setup of member groups of each Public Access areas regarding the content.
Currently, I am dealing with this requirement by using the "Umbraco. MemberHasAccess" function to the initial search results of the Examine Searcher so as to get the subset of the results that are accessible to the current logged on member and it works as expected.
My question are:
Is this the best practice in order to implement such functionality?
Using this approach may rise other issues like performance for
example?
Is Examine in general integrated in any way with the Role Based
Membership (Public Access feature) of Umbraco so as to provide this
functionality out of the box by the means of configuration settings
or helper functions?
Filtering Examine search results by members access rights
Hi all,
I have a web site setup with Umbraco (v7.7.7). There are about 3K content nodes, 1K members and about 70 member groups. Each member is assigned at least one member group and all content is protected by the use of nested Public Access areas (anonymous access is not supported).
The web site also provides a search functionality that is powered by Examine/Lucene and works fine in terms of returning the (correct) search results.
What I need to do is filter the search results based on the logged on member's access rights so as to display only the search results that are actually accessible to the member, taking into account the member groups that are assigned to the logged on member and the setup of member groups of each Public Access areas regarding the content.
Currently, I am dealing with this requirement by using the "Umbraco. MemberHasAccess" function to the initial search results of the Examine Searcher so as to get the subset of the results that are accessible to the current logged on member and it works as expected.
My question are:
Thanks in advance,
George
Hello George!
Did you ever find a solution to this? I'm wondering the same thing.
Anna
You will need to use gatheringnode data event and during indexing you will need to get the rights group and then inject those values into the index.
Next during search you get the logged in user and their groups and use that as the filter.
Regards
Ismail
is working on a reply...