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?
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.
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.
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
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
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
is working on a reply...