I need to take a backup of sitecollection whenever user tried to delete it. I am using SiteDeleting(SPWebEventProperties properties) event for this. One constraint is, i need to cancel the delete if the user is not siteadmin. My question is, how to cancel the delete if the user is not site admin.
bool res = properties.Web.UserIsSiteAdmin();
if (res)
{
//backup
}
else
{
//cancel
}
i have already done with the backup part but need to know how to cancel the delete.
Thanks in advance!