mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-13 20:29:34 +00:00
Patch delete user, org, project session impl and account for orgId in localStorage
This commit is contained in:
@@ -51,6 +51,17 @@ export const useDeleteUser = () => {
|
||||
return user;
|
||||
},
|
||||
onSuccess: () => {
|
||||
localStorage.removeItem("protectedKey");
|
||||
localStorage.removeItem("protectedKeyIV");
|
||||
localStorage.removeItem("protectedKeyTag");
|
||||
localStorage.removeItem("publicKey");
|
||||
localStorage.removeItem("encryptedPrivateKey");
|
||||
localStorage.removeItem("iv");
|
||||
localStorage.removeItem("tag");
|
||||
localStorage.removeItem("PRIVATE_KEY");
|
||||
localStorage.removeItem("orgData.id");
|
||||
localStorage.removeItem("projectData.id");
|
||||
|
||||
queryClient.clear();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -34,7 +34,6 @@ import * as yup from "yup";
|
||||
|
||||
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
||||
import { OrgPermissionCan } from "@app/components/permissions";
|
||||
import onboardingCheck from "@app/components/utilities/checks/OnboardingCheck";
|
||||
import { tempLocalStorage } from "@app/components/utilities/checks/tempLocalStorage";
|
||||
import { encryptAssymmetric } from "@app/components/utilities/cryptography/crypto";
|
||||
import {
|
||||
@@ -214,7 +213,6 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
||||
// }
|
||||
};
|
||||
putUserInOrg();
|
||||
onboardingCheck({});
|
||||
}, [router.query.id]);
|
||||
|
||||
const onCreateProject = async ({ name, addMembers }: TAddProjectFormData) => {
|
||||
|
||||
@@ -12,6 +12,7 @@ export const navigateUserToOrg = async (router: NextRouter) => {
|
||||
router.push(`/org/${userOrg}/overview`);
|
||||
} else {
|
||||
// user is not part of any org
|
||||
localStorage.removeItem("orgData.id");
|
||||
router.push("/org/none");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ export const NonePage = () => {
|
||||
const organization = await mutateAsync({
|
||||
name
|
||||
});
|
||||
|
||||
localStorage.setItem("orgData.id", organization._id);
|
||||
|
||||
createNotification({
|
||||
text: "Successfully created organization",
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ export const PreviewSection = () => {
|
||||
console.error(err);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
{subscription &&
|
||||
|
||||
-2
@@ -54,9 +54,7 @@ export const SecretTagsSection = (): JSX.Element => {
|
||||
colorSchema="secondary"
|
||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||
onClick={() => {
|
||||
console.log("x");
|
||||
handlePopUpOpen("CreateSecretTag");
|
||||
console.log("x2");
|
||||
}}
|
||||
isDisabled={!isAllowed}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user