Deleting an asset via Publisher is based on the respective user's user permissions and the defined deletable lifecycle states. The lifecycle state in which you can or can not delete an asset is defined in the asset extension (asset.js
) that corresponds to the asset type.
Follow the instructions below to define a set of deletable lifecycle states:
- Navigate to the respective asset extension in the
<ES_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/<ASSET_TYPE_NAME>/asset.js
directory. Define the deletable lifecycle states for the selected asset type under the
meta.lifecycle.deletableStates
property.A single deletable lifecycle state is defined as follows:
meta.lifecycle.deletableStates: ['State1']
Multiple deletable lifecycle states are defined as follows:
meta.lifecycle.deletableStates: ['State1',’State2’]
- All the lifecycle states are defined as deletable states as follows:
meta.lifecycle.deletableStates: ['*’]
Examples
Example 1:
The following example shows how you can define the Unpublished lifecycle state as a deletable state:
meta: { lifecycle: { deletableStates: ['Unpublished'] },
Example 2:
The following example shows how you can define the In-Review and Unpublished lifecycle states as deletable states:
meta: { lifecycle: { deletableStates: ['In-Review','Unpublished'] },
Example 3:
You can define all the lifecycle states as deletable states as follows:
meta: { lifecycle: { deletableStates: ['*'] },