How to hide or disable the unpublish button in AEM EDS universal Editor. | Community
Skip to main content
New Member
October 6, 2025
Solved

How to hide or disable the unpublish button in AEM EDS universal Editor.

  • October 6, 2025
  • 1 reply
  • 483 views

I have went through this documentation of Adobe for hiding using metadata, but where to apply in AEM XWalk UE project.  https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/customizing#publish-preview

Best answer by SantoshSai

Hi @viswa_vsu,

  1. In your XWalk repo, open head.html (root of the repo). That’s where UE config meta tags go. GitHub

  2. To remove the Publish UI, add this line inside <head>:

<meta name="urn:adobe:aue:config:disable" content="publish"/>

(Optional: also hide “Publish to Preview”):

<meta name="urn:adobe:aue:config:disable" content="publish-preview"/>

These are the official keys UE reads.

  1. About “Unpublish”: Adobe’s UE docs currently list disable flags for publish and publish-preview only; there’s no documented unpublish disable flag. The Unpublish action lives under the ellipsis menu. 

  2. If you must block Unpublish:

    • Clean way (no UI hack): remove replicate permissions for those author groups/paths in AEM so they can’t publish/unpublish at all. (AEM permission-based.) 

    • UI way: build a tiny UE extension to filter actions from the toolbar/ellipsis (hide Unpublish for specific paths/roles). 

  3. Deploy, open the page in Universal Editor, refresh, and confirm the Publish button (and preview option) are gone. 

1 reply

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
October 6, 2025

Hi @viswa_vsu,

  1. In your XWalk repo, open head.html (root of the repo). That’s where UE config meta tags go. GitHub

  2. To remove the Publish UI, add this line inside <head>:

<meta name="urn:adobe:aue:config:disable" content="publish"/>

(Optional: also hide “Publish to Preview”):

<meta name="urn:adobe:aue:config:disable" content="publish-preview"/>

These are the official keys UE reads.

  1. About “Unpublish”: Adobe’s UE docs currently list disable flags for publish and publish-preview only; there’s no documented unpublish disable flag. The Unpublish action lives under the ellipsis menu. 

  2. If you must block Unpublish:

    • Clean way (no UI hack): remove replicate permissions for those author groups/paths in AEM so they can’t publish/unpublish at all. (AEM permission-based.) 

    • UI way: build a tiny UE extension to filter actions from the toolbar/ellipsis (hide Unpublish for specific paths/roles). 

  3. Deploy, open the page in Universal Editor, refresh, and confirm the Publish button (and preview option) are gone. 

Santosh Sai
Viswa_vsuAuthor
New Member
October 8, 2025

I added the below metadata , But it hides both the publish and Unpublish button from UE.

<metaname="urn:adobe:aue:config:disable"content="publish"/>

 

Do we have any reference for capturing the Unpbulish action for UE extensions? https://developer.adobe.com/uix/docs/services/aem-universal-editor/api/header-menu/#api-reference

 

SantoshSai
Community Advisor
Community Advisor
October 8, 2025

@viswa_vsu 

Right now the <meta name="urn:adobe:aue:config:disable" content="publish"/> flag disables both Publish and Unpublish because UE treats them as a single group. Adobe hasn’t exposed a separate metadata key just for Unpublish.

If you only want to get rid of Unpublish, the way forward is through a Universal Editor extension. Adobe’s UIX API for UE (headerMenu) lets you read or override what shows up in the ellipsis menu. The default “Unpublish” action is just another button there.

So the pattern is:

  1. Create a UE extension with headerMenu.getButtons().

  2. In that method, grab the default buttons and filter out the one with id: "unpublish".

  3. Return the rest so everything else stays visible.

That way you can keep “Publish” but hide “Unpublish”.

Santosh Sai