diff --git a/frontend/app/components/Login/SSOLogin.tsx b/frontend/app/components/Login/SSOLogin.tsx index 5b8e52216..6e604913c 100644 --- a/frontend/app/components/Login/SSOLogin.tsx +++ b/frontend/app/components/Login/SSOLogin.tsx @@ -4,6 +4,7 @@ import { Button, Tooltip } from 'antd'; import { useTranslation } from 'react-i18next'; import { ENTERPRISE_REQUEIRED } from 'App/constants'; import stl from './login.module.css'; +import { useStore } from 'App/mstore'; interface SSOLoginProps { authDetails: any; @@ -11,7 +12,9 @@ interface SSOLoginProps { } const SSOLogin = ({ authDetails, enforceSSO = false }: SSOLoginProps) => { + const { userStore } = useStore(); const { t } = useTranslation(); + const { isEnterprise } = userStore; const getSSOLink = () => window !== window.top @@ -44,7 +47,7 @@ const SSOLogin = ({ authDetails, enforceSSO = false }: SSOLoginProps) => { - {authDetails.edition === 'ee' ? ( + {isEnterprise ? ( {t('SSO has not been configured.')}
diff --git a/frontend/app/mstore/userStore.ts b/frontend/app/mstore/userStore.ts index 239c5881b..f29fcd325 100644 --- a/frontend/app/mstore/userStore.ts +++ b/frontend/app/mstore/userStore.ts @@ -114,7 +114,9 @@ class UserStore { get isEnterprise() { return ( this.account?.edition === 'ee' || - this.authStore.authDetails?.edition === 'ee' + this.account?.edition === 'msaas' || + this.authStore.authDetails?.edition === 'ee' || + this.authStore.authDetails?.edition === 'msaas' ); } @@ -663,14 +665,14 @@ class AuthStore { { key: 'authDetails', serialize: (ad) => { - delete ad.edition; + // delete ad.edition; return Object.keys(ad).length > 0 ? JSON.stringify(ad) : JSON.stringify({}); }, deserialize: (json) => { const ad = JSON.parse(json); - delete ad.edition; + // delete ad.edition; return ad; }, },