Skip to content
Snippets Groups Projects
Commit b2538b17 authored by Tin Geber's avatar Tin Geber
Browse files

Arie's review

parent e414ad38
No related branches found
No related tags found
1 merge request!156Resolve "UI for reset 2FA and reset password"
Pipeline #43159 passed with stages
in 3 minutes and 47 seconds
......@@ -155,6 +155,8 @@ export const UserModal = ({ open, onClose, userId, setUserId, apps }: UserModalP
const totpModalOpen = () => {
if (userId) {
resetTotp(userId);
clearSelectedUser();
setUserId(userId);
}
setTotpModal(true);
};
......@@ -372,14 +374,23 @@ export const UserModal = ({ open, onClose, userId, setUserId, apps }: UserModalP
{buttonPasswordLink()}
</div>
</li>
{user.totp && (
<li className="py-4">
<div className="flex items-center justify-between">
<p className="leading-6 text-sm text-gray-500">Reset 2-factor authentication</p>
{buttonTotp()}
</div>
</li>
)}
{/* {user.totp && ( */}
<li className="py-4">
<div className="flex items-center justify-between">
<p className="leading-6 text-sm text-gray-500">Reset 2-factor authentication</p>
{user.totp ? (
<>{buttonTotp()}</>
) : (
<p
className="leading-6 text-sm text-gray-400 mb-4 sm:mb-0 inline-flex items-center px-4 py-2
font-medium rounded-md bg-gray-50"
>
No 2FA set
</p>
)}
</div>
</li>
{/* )} */}
{user.email !== currentUser?.email && (
<li className="py-4">
......@@ -416,7 +427,7 @@ export const UserModal = ({ open, onClose, userId, setUserId, apps }: UserModalP
onClose={totpModalClose}
title="Reset 2-Factor Authentication"
body="You have successfully removed the user's 2FA device."
dynamicData={recoveryLink}
dynamicData=""
/>
</>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment