Is there any event when user changes item's permission ? I tried to catch SPListItemUpdating
event for a necessary list, but it didn't work. Or can I attach to Permission list to handle SPListItemUpdating
event ?
4 Answers
There is a similar question here which asks the same.
As mentioned in the post, maybe you can take another approach, i.e. build an alternate way for users to change the permissions of an item. When the user applies the permissions (using the UI you've built), you can trigger an event, or start a workflow.
-
You linked a post that was from 2008 where it didn't provide any reason why It couldn't be done. That post is was relevant to any version of SP from 2008 and before...– HiTechCommented May 16, 2017 at 16:05
I'm afraid that is not possible.
Maybe you can take another approach: build an alternate way for users to change the permissions of an item. When the user applies the permissions (using the UI you've built), you can trigger an event, or start a workflow.
Going further, you could replace the default "Manage permissions" option in the ECB and replace it with a link to your custom permissions management UI.
More information:
Hope it helped :)
-
Apparently it is possible : abelsolutions.com/sharepoint-event-receivers– user43832Commented Jul 25, 2018 at 9:37
hi you can check this out, I dont know if its what your looking for:
http://nickgrattan.wordpress.com/2007/11/27/auditing-permission-changes/
hope it helps!
-
Although your answer may answer the question, links to blog posts often break, where as we won't be going anywhere for a long while. It's always a good idea to extract the useful parts for research if not all of it incase that happens (If it's not too long!) Please read the FAQ[1] for more information [1]:sharepoint.stackexchange.com/faq Commented Dec 2, 2012 at 3:25
You can catch permissions changing just in SharePoint 2013 (I did it in On Premise version) :
public class MyClass_PermissionEventReceiver : SPSecurityEventReceiver
{
public override void RoleAssignmentAdded(SPSecurityEventProperties properties)
{
base.RoleAssignmentAdded(properties);
}
public override void RoleAssignmentAdding(SPSecurityEventProperties properties)
{
base.RoleAssignmentAdding(properties);
}
}
Important moment that you need add your event receivers for Site or Web. But if you add it for web, it will catch permission changing on list or item levels too.