SharePoint 2010. A list is configured with this setting turned on: "Create items and edit items that were created by the user". Users can only edit or delete their own items; if they try to edit or delete someone else's items, they are shown an error message saying that they are not allowed to perform the action.
An ItemDeleting event receiver is attached to the list. The problem is it gets fired even though it will eventually get cancelled, because the user is not allowed to delete the item, due to the aforementioned settings.
Is there a way to prevent a custom event to fire in such a scenario? OR, is there a way to detect, from within the event receiver code, that this event will eventually get cancelled by the system ?
I would like not having to go through a check to determine whether the user is allowed to perform this particular action or not, because this would essentially make the above setting pointless (if I had to check the user's permissions anyway, I could as well turn it off).