From b9b44caed4c5141ede8dfeb782c0cb870a691844 Mon Sep 17 00:00:00 2001
From: Christopher Ng <chrng8@gmail.com>
Date: Tue, 25 Mar 2025 14:31:45 -0700
Subject: fix(settings): Separate subadmin options

Signed-off-by: Christopher Ng <chrng8@gmail.com>
---
 apps/settings/src/components/Users/UserRow.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'apps/settings/src/components/Users/UserRow.vue')

diff --git a/apps/settings/src/components/Users/UserRow.vue b/apps/settings/src/components/Users/UserRow.vue
index ec07b903f29..1432ed2c6af 100644
--- a/apps/settings/src/components/Users/UserRow.vue
+++ b/apps/settings/src/components/Users/UserRow.vue
@@ -146,7 +146,7 @@
 					:append-to-body="false"
 					:multiple="true"
 					:no-wrap="true"
-					:options="availableGroups.filter(availableGroup => availableGroup !== 'admin')"
+					:options="availableSubAdminGroups"
 					:placeholder="t('settings', 'Set account as admin for')"
 					:value="userSubAdminGroups"
 					@search="searchGroups"
@@ -596,6 +596,7 @@ export default {
 				})
 				const groups = await this.promise
 				this.availableGroups = groups
+				this.availableSubAdminGroups = groups.filter(group => group.id !== 'admin')
 			} catch (error) {
 				logger.error(t('settings', 'Failed to search groups'), { error })
 			}
@@ -753,6 +754,7 @@ export default {
 			try {
 				await this.$store.dispatch('addGroup', gid)
 				this.availableGroups.push({ id: gid, name: gid })
+				this.availableSubAdminGroups.push({ id: gid, name: gid })
 				const userid = this.user.id
 				await this.$store.dispatch('addUserGroup', { userid, gid })
 				this.userGroups.push({ id: gid, name: gid })
-- 
cgit v1.2.3

