Hi guys,
i have document library with more content types and I need to forbid users to delete items with some content types from library (these content types inherit from folder), users still can delete documents. I can do this using ItemDeleting reciever (i check for content type and then I can forbid deleting), but I have problem when users trying to delete these folders using File Explorer. File Explorer deletes underlying object first and then delete folder, so reciever fires for files in folder first, check for content type and files are deleted, folder remains undeleted but its empty.
I dont want to achieve my functionality using permissions due to performance issues, because I would have to broke role inheritence for each document in folder and I have a lot of documents in library.
Is there any other way how I can forbid deleting items with specified content type? Thanks a lot