Can I prevent a user from deleting his MySite?
5 Answers
Another option would be to develop an event receiver for the 'site is being deleted' event and have it canceled.
You can also decide whether you want to show an error message to the user (like: 'you cannot delete your own site!') or not.
You might be able to modify the permissions at the web application level through Central Admin.
Manage Web Applications > User Permissions
However, this will limit what the site collection administrator can do on his own site.
Here is a possible code solution to stop the WebDeleting event: https://stackoverflow.com/questions/1137445/how-to-prevent-a-mysite-owner-form-deleting-the-mysite-root-website
Users are granted site collection administrator rights to their My Site, so they'll have the ability to do so. Aside from training and making sure the sites are backed up routinely, I'm not sure there is anything else that can be done.
Some of the developers round here might have event receiver ideas.
And as Lori mentioned, you can fiddle with the web application permissions, but this would also prevent users from deleting any subsites they create in their My Site.
Along the lines of what Eric suggests: You could implement the Site Recycle Bin that is available from Microsoft (supports both sites and site collections). This way if a site was deleted, it could get undeleted again.
-
And in SharePoint 2010 SP1 Site Recycle Bin is included. Commented Nov 10, 2011 at 22:04
If the mysites are in a different web application than other team or publishing sites, you could consider adjusting the web application user permissions to remove the ability to delete the site.
-
You mean by policy? I wonder if that would interfer with the fact that users are site collection administrator on their own site Commented May 5, 2011 at 16:30