From e10d8a6fb9cac418ebb61c2c3c08ff02090d4973 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jesper=20M=C3=B8ller=20Jensen?=
<26099018+JesmoDev@users.noreply.github.com>
Date: Wed, 27 Sep 2023 20:46:02 +1300
Subject: [PATCH] dont show disable and enable button on current user profile
page
---
.../user-workspace-editor.element.ts | 36 ++++++++++---------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/packages/users/users/workspace/user-workspace-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/users/users/workspace/user-workspace-editor.element.ts
index f832bb498e..ed3b4afb6b 100644
--- a/src/Umbraco.Web.UI.Client/src/packages/users/users/workspace/user-workspace-editor.element.ts
+++ b/src/Umbraco.Web.UI.Client/src/packages/users/users/workspace/user-workspace-editor.element.ts
@@ -304,24 +304,26 @@ export class UmbUserWorkspaceEditorElement extends UmbLitElement {
const buttons: TemplateResult[] = [];
- if (this._user.state === UserStateModel.DISABLED) {
- buttons.push(html`
-
- `);
- }
+ if (this._user.id !== this._currentUser?.id) {
+ if (this._user.state === UserStateModel.DISABLED) {
+ buttons.push(html`
+
+ `);
+ }
- if (this._user.state === UserStateModel.ACTIVE || this._user.state === UserStateModel.INACTIVE) {
- buttons.push(html`
-
- `);
+ if (this._user.state === UserStateModel.ACTIVE || this._user.state === UserStateModel.INACTIVE) {
+ buttons.push(html`
+
+ `);
+ }
}
if (this._currentUser?.id !== this._user?.id) {