1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00

Prevent deleting yourself or resetting your own password from user details page

This commit is contained in:
Andrew Kingston 2022-08-02 14:37:18 +01:00
parent ad83d5ef26
commit 9c78ae349d

View file

@ -237,18 +237,21 @@
</div> </div>
</div> </div>
</div> </div>
{#if userId !== $auth.user._id}
<div> <div>
<ActionMenu align="right"> <ActionMenu align="right">
<span slot="control"> <span slot="control">
<Icon hoverable name="More" /> <Icon hoverable name="More" />
</span> </span>
<MenuItem on:click={resetPasswordModal.show} icon="Refresh" <MenuItem on:click={resetPasswordModal.show} icon="Refresh">
>Force Password Reset</MenuItem Force password reset
> </MenuItem>
<MenuItem on:click={deleteModal.show} icon="Delete">Delete</MenuItem <MenuItem on:click={deleteModal.show} icon="Delete">
> Delete
</MenuItem>
</ActionMenu> </ActionMenu>
</div> </div>
{/if}
</div> </div>
</Layout> </Layout>
<Layout gap="S" noPadding> <Layout gap="S" noPadding>