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:
parent
ea1d614f82
commit
ac03c08f33
@ -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;
|
||||
|
@ -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}}
|
||||
|
Loading…
Reference in New Issue
Block a user