From 06dbcde4bfba4bc4476bde3b98355d9a0bad3089 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Tue, 25 Mar 2025 14:31:45 -0700 Subject: fix(settings): Preserve system groups on reset Signed-off-by: Christopher Ng --- apps/settings/src/store/users.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/settings/src') diff --git a/apps/settings/src/store/users.js b/apps/settings/src/store/users.js index bab150d7229..6f7e2dbded7 100644 --- a/apps/settings/src/store/users.js +++ b/apps/settings/src/store/users.js @@ -232,7 +232,12 @@ const mutations = { * @param {object} state the store state */ resetGroups(state) { - state.groups = [...usersSettings.systemGroups] + const systemGroups = state.groups.filter(group => [ + 'admin', + '__nc_internal_recent', + 'disabled', + ].includes(group.id)) + state.groups = [...systemGroups] }, setShowConfig(state, { key, value }) { -- cgit v1.2.3