Enable Administrators to Delete a Channel
Introduction
Goal
Configure a publication channel as deletable so that users with administrator privileges can delete it in the Channel Manager.
Background
The Channel Manager supports the deletion of channels.
Deleting a channel is irreversible, meaning that once the deletion of a channel has been confirmed, there is no other way of bringing that channel back then to restore a back-up. Because deleting a channel is irreversible, the following safeguards have been implemented:
- only users with administrator privileges are allowed to delete a channel
- only channels marked deletable (see below) can be deleted
- a project can subscribe to the BeforeChannelDeleteEvent (see Respond to a Before Delete Channel Event) and provide additional safeguards
What is Deleted?
When a channel is deleted, the Channel Manager only deletes pieces of the HST configuration related to that channel. No content is deleted. If content related to the deleted channel should be deleted after the deletion of that channel, that content needs to be deleted manually or by subscribing to the BeforeChannelDeleteEvent.
The following pieces of HST configuration are deleted:
- The hst:channel node and its preview copy
- The hst:site node
-
All hst:mount nodes referring to the deleted channel, in all virtual host groups*
-
The hst:configuration node referred to by the hst:site node, along with its preview copy. If the hst:configuration node is inherited by another HST configuration node, only the preview copy is deleted.
-
In case of using the Relevance feature of Hippo's enterprise edition: All goals bound to a URL of the deleted channel are deleted as well. Consequently, all experiments bound to a deleted goal are deleted as well.
*If any of these hst:mount nodes contain child mount nodes, deletion of the channel will fail before the BeforeChannelDeleteEvent is published.
Mark a Channel as Deletable
By default, channels cannot be deleted. In order to be able to delete a channel, it must be marked as deletable. This mark is represented by the hst:deletable flag (Boolean property) on the hst:channel node:
+ hst:hst + hst:channels + my-channel - hst:deletable = true
The deletable mark can be bootstrapped, part of a blueprint (such that all channels created from that blueprint are deletable), or set using the Hippo Console or a custom Updater script. If the deletable mark is added to existing channels which have a preview copy, the mark should be set on both nodes.