SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We need to avoid our users, who are "site owners", delete his site collection by mistake.

The only method I think of is use Jquery to hide/disable the "Delete this site" button. Do we have other way to do so? For example disable the delete site permission. Thanks.


share|improve this question

A WebDeleting event can be used to prevent users event if they are owners to delete a site collection. Example:

public override void WebDeleting(SPWebEventProperties properties)
    properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.ErrorMessage = "This site cannot be deleted.";
    properties.Cancel = true;

See this for more info:

share|improve this answer

Other option is to create a HideCustomAction to hide the "Delete a site" action.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="">
    GroupId = "SiteTasks"
    HideActionId = "DeleteWeb"
    Location = "Microsoft.SharePoint.SiteSettings">

For a list of locations MSDN

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.