Provides methods to trap security-related events at the site or site collection level. To create a custom event receiver class you must derive from this class and overrides the methods.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration Public Class SPSecurityEventReceiver _ Inherits SPEventReceiverBase 'Usage Dim instance As SPSecurityEventReceiver
public class SPSecurityEventReceiver : SPEventReceiverBase
The class provides methods to trap events in five main categories: group events, user events, inheritance events, role assignment events, and role definition events. All of the class methods can be used at both the site and site collection level except the role definition events, which can only be used at the site level. None can be attached to list objects.
As mentioned, there are five categories of events:
User Events fire when you add or delete a SharePoint user or SharePoint group or Active Directory (AD) user or AD security group from an existing SharePoint group. Can be used at both the site collection (SPSite) and site (SPWeb) levels.
Inheritance Events fire when you break inheritance or reset inheritance (re-inherit) on lists, libraries, sites, and so forth. Can be used at both the site collection (SPSite) and site (SPWeb) levels.
Role assignment events
Role assignment events fire once inheritance is broken and you add or delete users or groups using the Permissions page for the associated site or list. Can be used at both the site collection (SPSite) and site (SPWeb) levels.
Role definition events
Role definition events fire when you add, update, or delete role definitions. These events can only be attached at the site collection (SPSite) level.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.