From 011e5c005bcbb62bbe0ad3aa593d9ac0935f81f3 Mon Sep 17 00:00:00 2001 From: tom27052006 <83423411+tom27052006@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:20:36 +0200 Subject: [PATCH] Add the Custom role to the admin panel The admin panel only knew types 0/1/2 plus the masqueraded "4": Manager mapping. A Custom member would have been shown as "Manager" with the Manager radio (value 3) preselected in the role dialog, so saving it silently converted the member to Manager and wiped their manage_* flags. Any remaining legacy Manager member (type 3) would have thrown a TypeError and broken the dialog entirely. Add a proper Custom (4) entry and radio button, and keep a Manager (3) entry for members created through older clients. --- src/static/scripts/admin_users.js | 6 +++++- src/static/templates/admin/users.hbs | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/static/scripts/admin_users.js b/src/static/scripts/admin_users.js index 99e39aab..1bae0aa3 100644 --- a/src/static/scripts/admin_users.js +++ b/src/static/scripts/admin_users.js @@ -174,10 +174,14 @@ const ORG_TYPES = { "name": "User", "bg": "blue" }, - "4": { + "3": { "name": "Manager", "bg": "green" }, + "4": { + "name": "Custom", + "bg": "teal" + }, }; // Special sort function to sort dates in ISO format diff --git a/src/static/templates/admin/users.hbs b/src/static/templates/admin/users.hbs index 4c91bc0e..3bd63446 100644 --- a/src/static/templates/admin/users.hbs +++ b/src/static/templates/admin/users.hbs @@ -135,6 +135,9 @@
+
+ +