mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Filter by groups
This commit is contained in:
parent
8df88919e0
commit
40e61b5f59
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
queries: [
|
||||
['GET', { uri: 'users' }]
|
||||
['GET', { uri: 'users?fields=username&fields=fullname&fields=mail&fields=mailbox-quota&fields=shell&fields=groups' }]
|
||||
],
|
||||
search: ''
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ export default {
|
|||
if (!this.users) return
|
||||
const search = this.search.toLowerCase()
|
||||
const filtered = this.users.filter(user => {
|
||||
return user.username.toLowerCase().includes(search)
|
||||
return user.username.toLowerCase().includes(search) || user.groups.includes(search)
|
||||
})
|
||||
return filtered.length === 0 ? null : filtered
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue