diff options
Diffstat (limited to 'settings/src/components/userList.vue')
-rw-r--r-- | settings/src/components/userList.vue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/settings/src/components/userList.vue b/settings/src/components/userList.vue index ec08992e6cc..f7aec953ecc 100644 --- a/settings/src/components/userList.vue +++ b/settings/src/components/userList.vue @@ -171,7 +171,7 @@ export default { }, filteredUsers() { if (this.selectedGroup === 'disabled') { - let disabledUsers = this.users.filter(user => user.enabled !== true); + let disabledUsers = this.users.filter(user => user.enabled === false); if (disabledUsers.length===0 && this.$refs.infiniteLoading && this.$refs.infiniteLoading.isComplete) { // disabled group is empty, redirection to all users this.$router.push({name: 'users'}); @@ -179,7 +179,11 @@ export default { } return disabledUsers; } - return this.users.filter(user => user.enabled === true); + if (!settings.isAdmin) { + // We don't want subadmins to edit themselves + return this.users.filter(user => user.enabled !== false && user.id !== oc_current_user); + } + return this.users.filter(user => user.enabled !== false); }, groups() { // data provided php side + remove the disabled group |