Compare commits
1 commit
main
...
fix-ee-che
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb423a2481 |
2 changed files with 8 additions and 6 deletions
|
|
@ -14,7 +14,7 @@ interface SSOLoginProps {
|
||||||
const SSOLogin = ({ authDetails, enforceSSO = false }: SSOLoginProps) => {
|
const SSOLogin = ({ authDetails, enforceSSO = false }: SSOLoginProps) => {
|
||||||
const { userStore } = useStore();
|
const { userStore } = useStore();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { isEnterprise } = userStore;
|
const { isSSOSupported } = userStore;
|
||||||
|
|
||||||
const getSSOLink = () =>
|
const getSSOLink = () =>
|
||||||
window !== window.top
|
window !== window.top
|
||||||
|
|
@ -47,7 +47,7 @@ const SSOLogin = ({ authDetails, enforceSSO = false }: SSOLoginProps) => {
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
{isEnterprise ? (
|
{isSSOSupported ? (
|
||||||
<span>
|
<span>
|
||||||
{t('SSO has not been configured.')}
|
{t('SSO has not been configured.')}
|
||||||
<br />
|
<br />
|
||||||
|
|
|
||||||
|
|
@ -114,12 +114,14 @@ class UserStore {
|
||||||
get isEnterprise() {
|
get isEnterprise() {
|
||||||
return (
|
return (
|
||||||
this.account?.edition === 'ee' ||
|
this.account?.edition === 'ee' ||
|
||||||
this.account?.edition === 'msaas' ||
|
this.authStore.authDetails?.edition === 'ee'
|
||||||
this.authStore.authDetails?.edition === 'ee' ||
|
|
||||||
this.authStore.authDetails?.edition === 'msaas'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isSSOSupported() {
|
||||||
|
return this.isEnterprise || this.account?.edition === 'msaas' || this.authStore.authDetails?.edition === 'msaas';
|
||||||
|
}
|
||||||
|
|
||||||
get isLoggedIn() {
|
get isLoggedIn() {
|
||||||
return Boolean(this.jwt);
|
return Boolean(this.jwt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue