mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
fix(settings): Separate subadmin options
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
4a7fee32db
commit
0eedb6904f
1 changed files with 3 additions and 1 deletions
|
|
@ -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 })
|
||||
|
|
|
|||
Loading…
Reference in a new issue