diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-07-18 14:37:19 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-20 14:37:41 +0200 |
commit | c5e82fc21c26c34e3a10ea3dc527759e07549f6d (patch) | |
tree | d8909b60d31eefc7e5d8a7004b9fea6d598d3c84 | |
parent | 1a0792b083bd415af16fc64e165ef6197b91defa (diff) | |
download | nextcloud-server-c5e82fc21c26c34e3a10ea3dc527759e07549f6d.tar.gz nextcloud-server-c5e82fc21c26c34e3a10ea3dc527759e07549f6d.zip |
Only show groups header in the sidebar, if groups are available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | settings/src/views/Users.vue | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/settings/src/views/Users.vue b/settings/src/views/Users.vue index dfb193d2a29..9e577160bb2 100644 --- a/settings/src/views/Users.vue +++ b/settings/src/views/Users.vue @@ -301,11 +301,16 @@ export default { } // Add separator - let separator = { - caption: true, - text: t('settings', 'Groups') - }; - groups.unshift(separator); + let realGroups = groups.find((group) => {return group.id !== 'disabled' && group.id !== 'admin'}); + realGroups = typeof realGroups === 'undefined' ? [] : realGroups; + realGroups = Array.isArray(realGroups) ? realGroups : [realGroups]; + if (realGroups.length > 0) { + let separator = { + caption: true, + text: t('settings', 'Groups') + }; + groups.unshift(separator); + } // Add everyone group |