requested changes & frontend lint

This commit is contained in:
Daniel Hougaard
2025-08-14 06:53:57 +04:00
parent 2113abcfdc
commit a37f1eb1f8
7 changed files with 16 additions and 24 deletions
@@ -238,7 +238,9 @@ export const Navbar = () => {
}
window.close();
return;
} else if (org.googleSsoAuthEnforced) {
}
if (org.googleSsoAuthEnforced) {
await logout.mutateAsync();
window.open(`/api/v1/sso/redirect/google?org_slug=${org.slug}`);
window.close();
@@ -85,8 +85,6 @@ export const SelectOrganizationSection = () => {
if ((organization.authEnforced || organization.googleSsoAuthEnforced) && !canBypassOrgAuth) {
const authToken = jwtDecode(getAuthToken()) as { authMethod: AuthMethod };
await new Promise((resolve) => setTimeout(resolve, 5_000));
// org has an org-level auth method enabled (e.g. SAML)
// -> logout + redirect to SAML SSO
let url = "";
@@ -215,8 +213,6 @@ export const SelectOrganizationSection = () => {
handleCliRedirect();
setIsInitialOrgCheckLoading(false);
} else {
console.log(organizations.data);
console.log("Calling this with single org?!??!?!::::", organizations.data.length);
handleSelectOrganization(organizations.data[0]);
}
} else {
@@ -226,7 +222,6 @@ export const SelectOrganizationSection = () => {
useEffect(() => {
if (defaultSelectedOrg) {
console.log("Calling this with default org?!??!?!::::", defaultSelectedOrg);
handleSelectOrganization(defaultSelectedOrg);
}
}, [defaultSelectedOrg]);
@@ -135,7 +135,7 @@ export const OrgGeneralAuthSection = ({
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
<Switch
id="enforce-org-auth"
id="enforce-saml-auth"
onCheckedChange={(value) =>
handleEnforceOrgAuthToggle(value, EnforceAuthType.SAML)
}
@@ -158,7 +158,7 @@ export const OrgGeneralAuthSection = ({
<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Sso}>
{(isAllowed) => (
<Switch
id="enforce-org-auth"
id="enforce-oidc-auth"
isChecked={currentOrg?.authEnforced ?? false}
onCheckedChange={(value) =>
handleEnforceOrgAuthToggle(value, EnforceAuthType.OIDC)