How to prevent a Space Administrator from delete their Space?

Bill Brinkley January 19, 2021

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,

3 answers

1 accepted

1 vote
Answer accepted
Thiago Masutti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2021

Hi @Bill Brinkley .

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


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

 


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>


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

0 votes
KAGITHALA BABU ANVESH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2021

Hi @Bill Brinkley ,

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/ 

0 votes
Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2021

Hi @Bill Brinkley 

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

There is an open ticket for it. Please watch and vote it.

Best

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.4.3
TAGS
AUG Leaders

Atlassian Community Events