1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Server: Hide Reset Password button when creating new users

This commit is contained in:
Laurent Cozic 2021-06-17 17:30:45 +01:00
parent ea1d614f82
commit ac03c08f33
2 changed files with 3 additions and 2 deletions

View File

@ -122,6 +122,7 @@ router.get('users/:id', async (path: SubPath, ctx: AppContext, user: User = null
view.content.error = error;
view.content.postUrl = postUrl;
view.content.showDeleteButton = !isNew && !!owner.is_admin && owner.id !== user.id;
view.content.showResetPasswordButton = !isNew && owner.is_admin;
if (config().accountTypesEnabled) {
view.content.showAccountTypes = true;

View File

@ -59,9 +59,9 @@
</div>
<div class="control">
<input type="submit" name="post_button" class="button is-primary" value="{{buttonTitle}}" />
{{#global.owner.is_admin}}
{{#showResetPasswordButton}}
<input type="submit" name="send_reset_password_email" class="button is-warning" value="Send reset password email" />
{{/global.owner.is_admin}}
{{/showResetPasswordButton}}
{{#showDeleteButton}}
<input type="submit" name="delete_button" class="button is-danger" value="Delete" />
{{/showDeleteButton}}