Restrict Experience Fragment Delete action visibility by group in Adobe Experience Manager Sites
This article explains how to control which user groups see the Delete action in the main Experience Fragment console. Use an overlay under /apps with a group-based granite:rendercondition to control the action’s visibility. Use repository permissions separately to restrict who can delete Experience Fragments. To fix this, overlay the main-console action, configure the group render condition, and test visibility and delete permissions separately.
Description description
Environment
Adobe Experience Manager Sites Experience Fragment console in AEM 6.5 or AEM as a Cloud Service. Implementation steps differ by deployment.
Issue/Symptoms
- The Delete action for Experience Fragments is visible to users regardless of group membership in the main console.
- You need to control which groups see the Delete action.
Cause
The main Experience Fragment console defines its selection-toolbar Delete action at /libs/cq/experience-fragments/content/experience-fragments/jcr:content/actions/selection/deletepage. A group-based granite:rendercondition in an overlay under /apps controls whether the action is rendered. This controls visibility only; repository permissions control whether a user can delete. This guidance covers the main console action. Validate search-results behavior separately for the target AEM release.
Resolution resolution
Follow the steps below to control the Delete action’s visibility in the main Experience Fragment console:
- Locate the Delete action node:
/libs/cq/experience-fragments/content/experience-fragments/jcr:content/actions/selection/deletepage. Use CRXDE Lite in AEM 6.5. For AEM as a Cloud Service, CRXDE Lite isn’t available; use the local AEM SDK or project source for development. - Create an overlay at the corresponding
/appspath:/apps/cq/experience-fragments/content/experience-fragments/jcr:content/actions/selection/deletepage. In AEM as a Cloud Service, include the overlay in your project source and deploy it through the Cloud Manager CI/CD pipeline. - In the overlaid node, add or configure a child node named
granite:rendercondition. - Configure the render condition for the user groups that should see the Delete action. Use a custom group-based rendering condition; see Restrict a Toolbar Action to a Specific Group.
- Save or deploy the changes. Test the main console action with a user who belongs to an allowed group and a user who doesn’t. Note: The render condition controls the action’s visibility; it doesn’t grant or deny delete permissions. Configure repository permissions separately if users must be prevented from deleting Experience Fragments. This procedure covers the main console action; validate search-results behavior separately for the target AEM release.
To identify the node corresponding to a UI button:
- Use your browser’s developer tools to inspect the button and note its class attribute, such as
cq-siteadmin-admin-actions-delete-activator. - In AEM 6.5, use CRXDE Lite to search for the class. For AEM as a Cloud Service, search the project source or inspect the repository with a supported read-only tool.
- Overlay and configure the node as described above.