aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/components/UserList.vue
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-04-24 13:10:37 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2025-04-27 11:35:40 +0200
commit6d8c49f0d4bc6c705fe42274ebe045b837c6ca87 (patch)
treeb88f6f2afad2ad230c0f880014e312f3e614ec43 /apps/settings/src/components/UserList.vue
parent8cc0c266d5ce2dd1966c8285d7b347ec1b3a0e98 (diff)
downloadnextcloud-server-6d8c49f0d4bc6c705fe42274ebe045b837c6ca87.tar.gz
nextcloud-server-6d8c49f0d4bc6c705fe42274ebe045b837c6ca87.zip
fix(settings): group admins only can add users to their groups
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/settings/src/components/UserList.vue')
-rw-r--r--apps/settings/src/components/UserList.vue6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/settings/src/components/UserList.vue b/apps/settings/src/components/UserList.vue
index 5d6bd5f04ee..84c204805cc 100644
--- a/apps/settings/src/components/UserList.vue
+++ b/apps/settings/src/components/UserList.vue
@@ -350,11 +350,13 @@ export default {
setNewUserDefaultGroup(value) {
// Is no value set, but user is a line manager we set their group as this is a requirement for line manager
if (!value && !this.settings.isAdmin && !this.settings.isDelegatedAdmin) {
+ const groups = this.$store.getters.getSubAdminGroups
// if there are multiple groups we do not know which to add,
// so we cannot make the managers life easier by preselecting it.
- if (this.groups.length === 1) {
- value = this.groups[0].id
+ if (groups.length === 1) {
+ this.newUser.groups = [...groups]
}
+ return
}
if (value) {