Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • George 7 posts 98 karma points
    Jan 14, 2018 @ 11:03
    George
    0

    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:

    1. Is this the best practice in order to implement such functionality? Using this approach may rise other issues like performance for example?
    2. 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?
    3. Is there any other suggested way?

    Thanks in advance,

    George

  • Anna 16 posts 110 karma points
    Sep 03, 2020 @ 06:31
    Anna
    0

    Hello George!

    Did you ever find a solution to this? I'm wondering the same thing.

    Anna

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Sep 03, 2020 @ 15:25
    Ismail Mayat
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft