From a499bfe6971e7a52bc0e9f42b4c2d53a7edb75cb Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 10 Apr 2024 11:19:10 +0200 Subject: [PATCH] add TODO --- .../documents/documents/workspace/actions/save.action.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/save.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/save.action.ts index f49852254f..385b7e565c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/save.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/save.action.ts @@ -14,6 +14,10 @@ export class UmbDocumentSaveWorkspaceAction extends UmbSubmitWorkspaceAction { will first be triggered when the condition is changed to permitted */ this.disable(); + // TODO: this check is not sufficient. It will show the save button if a use + // has only create options. The best solution would be to split the two buttons into two separate actions + // with a condition on isNew to show/hide them + // The server will throw a permission error if this scenario happens const condition = new UmbDocumentUserPermissionCondition(host, { host, config: {