|
|
|
@ -55,7 +55,7 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="userActions"> |
|
|
|
|
<div v-if="canEdit && !loading.all" class="toggleUserActions"> |
|
|
|
|
<div v-if="canEditUser(user) && !loading.all" class="toggleUserActions"> |
|
|
|
|
<Actions> |
|
|
|
|
<ActionButton icon="icon-rename" @click="toggleEdit"> |
|
|
|
|
{{ t('settings', 'Edit User') }} |
|
|
|
@ -79,7 +79,6 @@ |
|
|
|
|
<script> |
|
|
|
|
import { PopoverMenu, Actions, ActionButton } from '@nextcloud/vue' |
|
|
|
|
import ClickOutside from 'vue-click-outside' |
|
|
|
|
import { getCurrentUser } from '@nextcloud/auth' |
|
|
|
|
|
|
|
|
|
import UserRowMixin from '../../mixins/UserRowMixin' |
|
|
|
|
export default { |
|
|
|
@ -144,10 +143,9 @@ export default { |
|
|
|
|
} |
|
|
|
|
return t('settings', '{size} used', { size: OC.Util.humanFileSize(0) }) |
|
|
|
|
}, |
|
|
|
|
canEdit() { |
|
|
|
|
return getCurrentUser().uid !== this.user.id && this.user.id !== 'admin' |
|
|
|
|
canEditUser() { |
|
|
|
|
return (user) => this.settings.isAdmin || user.id !== OC.getCurrentUser().uid |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
hideMenu() { |
|
|
|
|