ToolJet/server/migrations/1753084800000-AllowMultipleOIDCConfigs.ts
Muhsin Shah C P b568bbb8fc
[feature] Able to configure multiple OIDC provider for an organisation (#14640)
* feat: add multi-tenant OIDC support and update organization SSO configuration handling

* feat: implement create and delete organization SSO configuration endpoints

* feat: add BackWithoutArrow icon and support for multiple organization SSO configurations

* feat: enhance OIDC support by fetching fresh data and adding count badge

* feat: update OIDC handling to check for enabled configurations

* refactor: remove createOrganizationSSO function and related features; update OIDC handling for multi-tenant support

* refactor: enhance SSO configuration processing to handle single and array formats

* refactor: improve OIDC handling to support both array and single object formats

* Update exisiting test cases for OIDC multi-tenent component changes

* Fix okta oidc spec for multi tenent feature

* Fix for Auto-enable sso bug

* Refactor SSO count logic to handle unique SSO types for multi-OIDC support

* Refactor SSO theme styles for improved readability and maintainability

* Add normal mix-blend-mode for oidc-count-badge in dark theme

---------

Co-authored-by: ajith-k-v <ajith.jaban@gmail.com>
2025-12-12 19:13:43 +05:30

17 lines
695 B
TypeScript

import { MigrationInterface, QueryRunner } from 'typeorm';
export class AllowMultipleOIDCConfigs1753084800000 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
// Drop the old unique constraint that prevents multiple SSO configs per organization
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_CONFIG_SCOPE_ORG_SSO";`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
// Restore the original unique constraint
await queryRunner.query(`
CREATE UNIQUE INDEX "IDX_CONFIG_SCOPE_ORG_SSO"
ON "sso_configs" ("config_scope", "organization_id", "sso")
WHERE "organization_id" IS NOT NULL;
`);
}
}