How to prevent a Space Administrator from delete their Space?
Asked by Bill Brinkley:

How do you configure Confluence to prevent a Space Administrator from deleting their Space. We want to make this a Confluence Administrator task. We are having to restore Spaces that were deleted and then needed by the Space users. Thanks,


Answers:
author: Thiago Masutti
body: Hi [@Bill Brinkley](/t5/user/viewprofilepage/user-id/1885155) .

This is really not something you could configure on Confluence out-of-the-box.

If you need to give **Space Deletion** permissions only to **Confluence Administrators** , then you are able to do that by applying **non-standard customization** to your Confluence.

The contents of the **\<*confluence-install*\>/confluence/spaces/removespace.vm** file controls the appearance of the Delete Space feature in the UI.  
This is how it looks when using the default contents for that file.

![space-delete-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/126466i210210DAE6703A76/image-dimensions/498x214?v=v2 "space-delete-1.png")

<br />

You could customize it in a way that only **Confluence Administrators** would be able to see this information and, therefore, delete the Space.  
Other users, such as **Space Administrators**, would see something as the sample below.

![space-delete-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/126467iD573B55438145D68/image-dimensions/521x272?v=v2 "space-delete-2.png")

<br />

If this is something that is valuable to you, you could use the following content on the **\<*confluence-install*\>/confluence/spaces/removespace.vm** file.

```
<html>
<head>
<title>$action.getText("title.remove.space")</title>
</head>

#applyDecorator("root")
#decoratorParam("helper" $action.helper)
#decoratorParam("context" "space-administration")
#decoratorParam("mode" "view-space-administration")

<body>
#applyDecorator ("root")
#decoratorParam ("context" "spaceadminpanel")
#decoratorParam ("selection" "removespace")
#decoratorParam ("title" "$action.getText('title.remove.space')")
#decoratorParam ("selectedTab" "admin")
#decoratorParam ("selectedSpaceToolsWebItem", "removespace")
#decoratorParam("helper" $action.helper)

#if( $permissionHelper.isConfluenceAdministrator($remoteUser) )

#applyDecorator ("confirm")

<p>$action.getText("remove.space.desc")</p>
#if( $action.showLargeQueueWarning)
#applyDecorator("message" "$action.getText('info.word')")
#decoratorParam("type" "info")
$action.getText("com.atlassian.confluence.spaces.actions.RemoveSpaceAction.warn.large.indexqueue", [$action.indexQueueSize])
#end
#end
#applyDecorator ("message" "$action.getText('warning.word')")
#decoratorParam("type" "warning")
$action.getText('removespace.operation.cannot.be.undone')
#end

#decoratorParam ("formAction" "doremovespace.action?key=$htmlUtil.urlEncode($space.key)")
#decoratorParam ("formName" "removespaceform")

$action.getText("alert.remove.space", [$htmlUtil.htmlEncodeAndReplaceSpaces($space.key), $webwork.htmlEncode($space.name)])
#end

#else

#applyDecorator ("message" "$action.getText('warning.word')")
#decoratorParam("type" "warning")
<p>You don't have permission to delete this Space.</br>Please contact your Confluence administrator.</p>
#end

#end

#end

</body>

#end
</html>
```

<br />

You don't need to restart Confluence after making changes to this file.  
You would also need to check this file after every upgrade to see if the same modifications would still be valid and reapply them.

Let us know if that works to you.

Kind regards,  
Thiago Masutti


author: KAGITHALA BABU ANVESH
body: Hi [@Bill Brinkley](/t5/user/viewprofilepage/user-id/1885155) ,

I think we can't restrict space admin for deleting space from instance.

Please check the below link

<https://support.atlassian.com/confluence-cloud/docs/delete-a-space/>


author: Tansu Akdeniz
body: Hi [@Bill Brinkley](/t5/user/viewprofilepage/user-id/1885155)

If you give space admin permission, they can delete it.

There is an [open ticket](https://jira.atlassian.com/browse/CONFSERVER-1909) for it. Please watch and vote it.

Best


Tags: confluence-server

server