mirror of
https://github.com/logto-io/logto.git
synced 2025-04-07 23:01:25 -05:00
feat: remove SAML app dev feature guard
This commit is contained in:
parent
faf7e3c928
commit
c39491c4fe
3 changed files with 7 additions and 20 deletions
|
@ -47,16 +47,13 @@ export const useAppGuideMetadata = (): {
|
|||
/**
|
||||
* Show SAML guides when it is:
|
||||
* 1. Cloud env
|
||||
* 2. `isDevFeatureEnabled` is true
|
||||
* 3. `quota.samlApplicationsLimit` is not 0.
|
||||
* 2. `quota.samlApplicationsLimit` is not 0.
|
||||
*/
|
||||
)
|
||||
.filter(
|
||||
({ metadata: { target } }) =>
|
||||
target !== ApplicationType.SAML ||
|
||||
(isCloudEnv &&
|
||||
isDevFeaturesEnabled &&
|
||||
currentSubscriptionQuota.samlApplicationsLimit !== 0)
|
||||
(isCloudEnv && currentSubscriptionQuota.samlApplicationsLimit !== 0)
|
||||
),
|
||||
[]
|
||||
);
|
||||
|
|
|
@ -13,7 +13,6 @@ import { generateStandardId, generateStandardSecret } from '@logto/shared';
|
|||
import { conditional } from '@silverhand/essentials';
|
||||
import { boolean, object, string, z } from 'zod';
|
||||
|
||||
import { EnvSet } from '#src/env-set/index.js';
|
||||
import RequestError from '#src/errors/RequestError/index.js';
|
||||
import koaGuard from '#src/middleware/koa-guard.js';
|
||||
import koaPagination from '#src/middleware/koa-pagination.js';
|
||||
|
@ -42,10 +41,9 @@ const hideOidcClientMetadataForSamlApp = (application: Application) => {
|
|||
return {
|
||||
...application,
|
||||
...conditional(
|
||||
application.type === ApplicationType.SAML &&
|
||||
EnvSet.values.isDevFeaturesEnabled && {
|
||||
oidcClientMetadata: buildOidcClientMetadata(),
|
||||
}
|
||||
application.type === ApplicationType.SAML && {
|
||||
oidcClientMetadata: buildOidcClientMetadata(),
|
||||
}
|
||||
),
|
||||
};
|
||||
};
|
||||
|
|
|
@ -101,11 +101,7 @@ const createRouters = (tenant: TenantContext) => {
|
|||
systemRoutes(managementRouter, tenant);
|
||||
subjectTokenRoutes(managementRouter, tenant);
|
||||
accountCentersRoutes(managementRouter, tenant);
|
||||
// TODO: @darcy per our design, we will move related routes to Cloud repo and the routes will be loaded from remote.
|
||||
if (
|
||||
(EnvSet.values.isDevFeaturesEnabled && EnvSet.values.isCloud) ||
|
||||
EnvSet.values.isIntegrationTest
|
||||
) {
|
||||
if (EnvSet.values.isCloud || EnvSet.values.isIntegrationTest) {
|
||||
samlApplicationRoutes(managementRouter, tenant);
|
||||
}
|
||||
|
||||
|
@ -121,11 +117,7 @@ const createRouters = (tenant: TenantContext) => {
|
|||
wellKnownRoutes(anonymousRouter, tenant);
|
||||
statusRoutes(anonymousRouter, tenant);
|
||||
authnRoutes(anonymousRouter, tenant);
|
||||
// TODO: @darcy per our design, we will move related routes to Cloud repo and the routes will be loaded from remote.
|
||||
if (
|
||||
(EnvSet.values.isDevFeaturesEnabled && EnvSet.values.isCloud) ||
|
||||
EnvSet.values.isIntegrationTest
|
||||
) {
|
||||
if (EnvSet.values.isCloud || EnvSet.values.isIntegrationTest) {
|
||||
samlApplicationAnonymousRoutes(anonymousRouter, tenant);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue