From 77afdb1cc48de025312d6ed656706442e81bc90d Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Wed, 15 Oct 2025 11:10:36 -0700 Subject: [PATCH] add UI for changing user role (#4554) --- apps/frontend/src/locales/en-US/index.json | 3 + apps/frontend/src/pages/user/[id].vue | 104 +++++++++++++++++++++ 2 files changed, 107 insertions(+) diff --git a/apps/frontend/src/locales/en-US/index.json b/apps/frontend/src/locales/en-US/index.json index 66ccb162d..f874c2a86 100644 --- a/apps/frontend/src/locales/en-US/index.json +++ b/apps/frontend/src/locales/en-US/index.json @@ -1106,6 +1106,9 @@ "profile.button.billing": { "message": "Manage user billing" }, + "profile.button.edit-role": { + "message": "Edit role" + }, "profile.button.info": { "message": "View user details" }, diff --git a/apps/frontend/src/pages/user/[id].vue b/apps/frontend/src/pages/user/[id].vue index afa64d155..09eabae61 100644 --- a/apps/frontend/src/pages/user/[id].vue +++ b/apps/frontend/src/pages/user/[id].vue @@ -2,6 +2,37 @@
+ +
+
+ +
+
+ + + + + + +
+
+
@@ -127,6 +158,10 @@ }, { id: 'copy-id', action: () => copyId() }, { id: 'copy-permalink', action: () => copyPermalink() }, + { + divider: true, + shown: auth.user && isAdmin(auth.user), + }, { id: 'open-billing', action: () => navigateTo(`/admin/billing/${user.id}`), @@ -137,6 +172,11 @@ action: () => $refs.userDetailsModal.show(), shown: auth.user && isStaff(auth.user), }, + { + id: 'edit-role', + action: () => openRoleEditModal(), + shown: auth.user && isAdmin(auth.user), + }, ]" aria-label="More options" > @@ -165,6 +205,10 @@