diff --git a/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx index 4526a942412..d776cec28a3 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx @@ -4,7 +4,7 @@ import { Controller, useFormContext } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; import InlineUpsell from '@/components/InlineUpsell'; -import { isDevFeaturesEnabled, isCloud } from '@/consts/env'; +import { isCloud } from '@/consts/env'; import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider'; import Card from '@/ds-components/Card'; import CodeEditor from '@/ds-components/CodeEditor'; @@ -67,7 +67,7 @@ function CustomUiForm() { )} /> - {isDevFeaturesEnabled && isCloud && ( + {isCloud && ( ( }, ]: RouterInitArgs ) { - // TODO: Remove - if (!EnvSet.values.isDevFeaturesEnabled) { - return; - } - router.post( '/sign-in-exp/default/custom-ui-assets', - // Manually add this to avoid the case that the dev feature guard is removed but the quota guard is not being updated accordingly. - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition EnvSet.values.isDevFeaturesEnabled ? newKoaQuotaGuard({ key: 'bringYourUiEnabled', quota }) : koaQuotaGuard({ key: 'bringYourUiEnabled', quota }), diff --git a/packages/core/src/routes/swagger/utils/documents.ts b/packages/core/src/routes/swagger/utils/documents.ts index 651383dddba..f0ad249328d 100644 --- a/packages/core/src/routes/swagger/utils/documents.ts +++ b/packages/core/src/routes/swagger/utils/documents.ts @@ -51,11 +51,7 @@ const managementApiIdentifiableEntityNames = Object.freeze([ /** Additional tags that cannot be inferred from the path. */ const additionalTags = Object.freeze( - condArray( - 'Organization applications', - EnvSet.values.isDevFeaturesEnabled && 'Custom UI assets', - 'Organization users' - ) + condArray('Organization applications', 'Custom UI assets', 'Organization users') ); export const buildManagementApiBaseDocument = ( diff --git a/packages/core/src/routes/swagger/utils/operation-id.ts b/packages/core/src/routes/swagger/utils/operation-id.ts index 4843dd4d43a..90a6894fee5 100644 --- a/packages/core/src/routes/swagger/utils/operation-id.ts +++ b/packages/core/src/routes/swagger/utils/operation-id.ts @@ -27,8 +27,6 @@ type RouteDictionary = Record<`${OpenAPIV3.HttpMethods} ${string}`, string>; const devFeatureCustomRoutes: RouteDictionary = Object.freeze({ // Subject tokens 'post /subject-tokens': 'CreateSubjectToken', - // Custom UI assets - 'post /sign-in-exp/default/custom-ui-assets': 'UploadCustomUiAssets', }); export const customRoutes: Readonly = Object.freeze({ @@ -83,6 +81,8 @@ export const customRoutes: Readonly = Object.freeze({ // Well-known 'get /.well-known/phrases': 'GetSignInExperiencePhrases', 'get /.well-known/sign-in-exp': 'GetSignInExperienceConfig', + // Custom UI assets + 'post /sign-in-exp/default/custom-ui-assets': 'UploadCustomUiAssets', ...(EnvSet.values.isDevFeaturesEnabled ? devFeatureCustomRoutes : {}), } satisfies RouteDictionary); // Key assertion doesn't work without `satisfies`