|
|
|
|
@ -49,36 +49,6 @@ |
|
|
|
|
<span class="row__subtitle">{{ user.id }}</span> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<td |
|
|
|
|
data-cy-user-list-cell-password |
|
|
|
|
class="row__cell" |
|
|
|
|
:class="{ 'row__cell--obfuscated': hasObfuscated }"> |
|
|
|
|
<template v-if="editing && settings.canChangePassword && user.backendCapabilities.setPassword"> |
|
|
|
|
<NcTextField |
|
|
|
|
v-model="editedPassword" |
|
|
|
|
class="user-row-text-field" |
|
|
|
|
data-cy-user-list-input-password |
|
|
|
|
:data-loading="loading.password || undefined" |
|
|
|
|
:trailing-button-label="t('settings', 'Submit')" |
|
|
|
|
:class="{ 'icon-loading-small': loading.password }" |
|
|
|
|
:show-trailing-button="true" |
|
|
|
|
:disabled="loading.password || isLoadingField" |
|
|
|
|
:minlength="minPasswordLength" |
|
|
|
|
maxlength="469" |
|
|
|
|
:label="t('settings', 'Set new password')" |
|
|
|
|
trailing-button-icon="arrowEnd" |
|
|
|
|
autocapitalize="off" |
|
|
|
|
autocomplete="new-password" |
|
|
|
|
required |
|
|
|
|
spellcheck="false" |
|
|
|
|
type="password" |
|
|
|
|
@trailing-button-click="updatePassword" /> |
|
|
|
|
</template> |
|
|
|
|
<span v-else-if="isObfuscated"> |
|
|
|
|
{{ t('settings', 'You do not have permissions to see the details of this account') }} |
|
|
|
|
</span> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<td class="row__cell" data-cy-user-list-cell-email> |
|
|
|
|
<template v-if="editing"> |
|
|
|
|
<NcTextField |
|
|
|
|
@ -105,7 +75,7 @@ |
|
|
|
|
</span> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<td class="row__cell row__cell--large row__cell--multiline" data-cy-user-list-cell-groups> |
|
|
|
|
<td class="row__cell row__cell--groups row__cell--multiline" data-cy-user-list-cell-groups> |
|
|
|
|
<template v-if="editing"> |
|
|
|
|
<label |
|
|
|
|
class="hidden-visually" |
|
|
|
|
@ -361,11 +331,6 @@ export default { |
|
|
|
|
required: true, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
hasObfuscated: { |
|
|
|
|
type: Boolean, |
|
|
|
|
required: true, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
quotaOptions: { |
|
|
|
|
type: Array, |
|
|
|
|
required: true, |
|
|
|
|
@ -398,7 +363,6 @@ export default { |
|
|
|
|
loading: { |
|
|
|
|
all: false, |
|
|
|
|
displayName: false, |
|
|
|
|
password: false, |
|
|
|
|
mailAddress: false, |
|
|
|
|
groups: false, |
|
|
|
|
groupsDetails: false, |
|
|
|
|
@ -413,7 +377,6 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
editedDisplayName: this.user.displayname, |
|
|
|
|
editedPassword: '', |
|
|
|
|
editedMail: this.user.email ?? '', |
|
|
|
|
// Cancelable promise for search groups request |
|
|
|
|
promise: null, |
|
|
|
|
@ -768,29 +731,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Set user password |
|
|
|
|
*/ |
|
|
|
|
async updatePassword() { |
|
|
|
|
this.loading.password = true |
|
|
|
|
if (this.editedPassword.length === 0) { |
|
|
|
|
showError(t('settings', "Password can't be empty")) |
|
|
|
|
this.loading.password = false |
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
|
await this.$store.dispatch('setUserData', { |
|
|
|
|
userid: this.user.id, |
|
|
|
|
key: 'password', |
|
|
|
|
value: this.editedPassword, |
|
|
|
|
}) |
|
|
|
|
this.editedPassword = '' |
|
|
|
|
showSuccess(t('settings', 'Password was successfully changed')) |
|
|
|
|
} finally { |
|
|
|
|
this.loading.password = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Set user mailAddress |
|
|
|
|
*/ |
|
|
|
|
|