diff --git a/packages/backend/src/app/ee/platform/lib/platform-utils.ts b/packages/backend/src/app/ee/platform/lib/platform-utils.ts index 334e83a8c5..e53f804c2f 100644 --- a/packages/backend/src/app/ee/platform/lib/platform-utils.ts +++ b/packages/backend/src/app/ee/platform/lib/platform-utils.ts @@ -3,12 +3,14 @@ import { FastifyRequest } from 'fastify' import { customDomainService } from '../../custom-domains/custom-domain.service' import { getEdition } from '../../../helper/secret-helper' import { platformService } from '../platform.service' +import { system } from '../../../helper/system/system' +import { SystemProp } from '../../../helper/system/system-prop' const edition = getEdition() export const resolvePlatformIdForRequest = async (request: FastifyRequest): Promise => { if (edition === ApEdition.COMMUNITY) { - return getDefaultPlatformId() + return null } return await extractPlatformIdFromAuthenticatedPrincipal(request.principal) @@ -29,5 +31,5 @@ async function getDefaultPlatformId(): Promise { const platform = await platformService.getOldestPlatform() return platform?.id ?? null } - return null + return system.getOrThrow(SystemProp.CLOUD_PLATFORM_ID) } \ No newline at end of file diff --git a/packages/ui/core/src/app/app.component.html b/packages/ui/core/src/app/app.component.html index 3929d516af..8ad6b1ac58 100644 --- a/packages/ui/core/src/app/app.component.html +++ b/packages/ui/core/src/app/app.component.html @@ -22,7 +22,6 @@ - diff --git a/packages/ui/core/src/app/app.component.ts b/packages/ui/core/src/app/app.component.ts index d44e334ed9..38b0cbc300 100644 --- a/packages/ui/core/src/app/app.component.ts +++ b/packages/ui/core/src/app/app.component.ts @@ -28,13 +28,7 @@ import { FlowBuilderService, } from '@activepieces/ui/common'; import { compareVersions } from 'compare-versions'; -import { - ApEdition, - ApFlagId, - LocalesEnum, - User, - isNil, -} from '@activepieces/shared'; +import { ApEdition, ApFlagId, LocalesEnum, User } from '@activepieces/shared'; import { TelemetryService, EmbeddingService, @@ -99,18 +93,6 @@ export class AppComponent implements OnInit { tap(() => this.loadingTheme$.next(false)), map(() => void 0) ); - // TODO remove in next release - this.logoutOldTokens$ = this.flagService.getEdition().pipe( - tap((edition) => { - if ( - edition === ApEdition.CLOUD && - isNil(this.authenticationService.getDecodedToken()?.platform) - ) { - this.authenticationService.logout(); - } - }), - map(() => void 0) - ); this.embeddedRouteListener$ = this.createEmbeddingRoutesListener(); this.routeLoader$ = this.createRouteListenerToToggleLoadingAndSetTitle(); this.showUpgradeNotification$ =