Skip to content

Commit 0285e1c

Browse files
ArsalanulhaqAntreesy
authored andcommitted
fix(NewUserDialog): update group selection to prevent admin group from being assigned as subadmin
Signed-off-by: Arsalan Ul Haq Sohni <[email protected]>
1 parent d701b5b commit 0285e1c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/settings/src/components/Users/NewUserDialog.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
:input-label="t('settings', 'Admin of the following groups')"
8888
:placeholder="t('settings', 'Set account as admin for …')"
8989
:disabled="loading.groups || loading.all"
90-
:options="availableGroups"
90+
:options="availableSubAdminGroups"
9191
:close-on-select="false"
9292
:multiple="true"
9393
label="name"
@@ -218,6 +218,10 @@ export default {
218218
return groups.filter(group => group.id !== '__nc_internal_recent' && group.id !== 'disabled')
219219
},
220220
221+
availableSubAdminGroups() {
222+
return this.availableGroups.filter((group) => group.id !== 'admin')
223+
},
224+
221225
languages() {
222226
return [
223227
{

0 commit comments

Comments
 (0)