diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx
index 84dc0f480..357e7c770 100644
--- a/frontend/src/layouts/AppLayout/AppLayout.tsx
+++ b/frontend/src/layouts/AppLayout/AppLayout.tsx
@@ -238,7 +238,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
projectId: newProjectId
});
}
-
+
// eslint-disable-next-line no-promise-executor-return -- We do this because the function returns too fast, which sometimes causes an error when the user is redirected.
await new Promise((resolve) => setTimeout(resolve, 2_000));
@@ -250,7 +250,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
createNotification({ text: "Failed to create workspace", type: "error" });
}
};
-
+
return (
<>
@@ -288,41 +288,43 @@ export const AppLayout = ({ children }: LayoutProps) => {
{user?.email}
- {orgs?.map((org) => {
+ {orgs?.map((org) => {
return (
-
- {
- if (currentOrg?.id === org.id) return;
-
- if (org.authEnforced) {
- // org has an org-level auth method enabled (e.g. SAML)
- // -> logout + redirect to SAML SSO
+
+ {
+ if (currentOrg?.id === org.id) return;
- await logout.mutateAsync();
- window.open(`/api/v1/sso/redirect/saml2/organizations/${org.slug}`);
- window.close();
- return;
+ if (org.authEnforced) {
+ // org has an org-level auth method enabled (e.g. SAML)
+ // -> logout + redirect to SAML SSO
+
+ await logout.mutateAsync();
+ window.open(
+ `/api/v1/sso/redirect/saml2/organizations/${org.slug}`
+ );
+ window.close();
+ return;
+ }
+
+ changeOrg(org?.id);
+ }}
+ variant="plain"
+ colorSchema="secondary"
+ size="xs"
+ className="flex w-full items-center justify-start p-0 font-normal"
+ leftIcon={
+ currentOrg?.id === org.id && (
+
+ )
}
-
- changeOrg(org?.id)
- }}
- variant="plain"
- colorSchema="secondary"
- size="xs"
- className="flex w-full items-center justify-start p-0 font-normal"
- leftIcon={
- currentOrg?.id === org.id && (
-
- )
- }
- >
-
- {org.name}
-
-
-
- )
+ >
+
+ {org.name}
+
+
+
+ );
})}
{/*
{
- {(window.location.origin.includes("https://app.infisical.com")) && (
+ {window.location.origin.includes("https://app.infisical.com") && (
setTimeout(resolve, 2_000));
- const decryptKey = await fetchUserWsKey(newWorkspaceId);
-
- await addWsUser.mutateAsync({
- workspaceId: newWorkspaceId,
- decryptKey,
- userPrivateKey: PRIVATE_KEY,
- members: orgUsers
- .filter(
- ({ status, user: orgUser }) => status === "accepted" && user.email !== orgUser.email
- )
- .map(({ user: orgUser, id: orgMembershipId }) => ({
- userPublicKey: orgUser.publicKey,
- orgMembershipId
- }))
- });
- }
- */
createNotification({ text: "Workspace created", type: "success" });
handlePopUpClose("addNewWs");
createNotification({ text: "Workspace created", type: "success" });
diff --git a/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberListTab.tsx b/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberListTab.tsx
index 221cdb763..027ea3c7f 100644
--- a/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberListTab.tsx
+++ b/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberListTab.tsx
@@ -135,6 +135,8 @@ export const MemberListTab = () => {
text: "Failed to add user to project, unknown project type",
type: "error"
});
+
+ return;
}
createNotification({
text: "Successfully added user to the project",