Copied to clipboard

Flag this post as spam?

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


  • Michael Chart 15 posts 35 karma points
    May 02, 2014 @ 14:03
    Michael Chart
    0

    Event hooks on media public access change

    I'm looking to add events when a user adds or removes protection from a media item. Are there media protect equivalents of umbraco.cms.businesslogic.web.Access.AfterAddProtection and umbraco.cms.businesslogic.web.Access.AfterRemoveProtection?

    What I'm trying to do is to add a "GroupAccess" property to the examine index when a user updates the protection on a media item (inspired by http://thecogworks.co.uk/blog/posts/2013/march/examiness-hints-and-tips-from-the-trenches-part-9-secure-searching/).

    Mike

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    May 02, 2014 @ 16:01
    Richard Soeteman
    0

    Hi Mike,

    Sorry no events when modifying access. Good point to add it in a future release. I think a customer of mine used a custom indexer to add protection to the index. Might also work for you?

    Unfortunately I can't remember how they did it. Maybe Examine documentation describes how you can create a custom indexer.

    Best,

    Richard

  • Michael Chart 15 posts 35 karma points
    May 02, 2014 @ 16:06
    Michael Chart
    0

    OK - thanks for the reply.

    What I'm doing instead is to get all media that match the search query and then filter out those that are unaccessible to the current user using MediaProtect.Library.Library.HasAccess.

    Cheers,

    Mike

Please Sign in or register to post replies

Write your reply to:

Draft