mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
24 lines
1 KiB
TypeScript
24 lines
1 KiB
TypeScript
|
|
import { InstanceSettings } from '@entities/instance_settings.entity';
|
||
|
|
import { INSTANCE_SETTINGS_TYPE, INSTANCE_SYSTEM_SETTINGS } from '@modules/instance-settings/constants';
|
||
|
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||
|
|
|
||
|
|
export class AddEnableSignUpInInstanceSettings1706012702739 implements MigrationInterface {
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
const entityManager = queryRunner.manager;
|
||
|
|
|
||
|
|
await entityManager.insert(InstanceSettings, {
|
||
|
|
label: 'Enable SignUp',
|
||
|
|
labelKey: 'header.organization.menus.manageSSO.generalSettings.enableSignUp',
|
||
|
|
dataType: 'boolean',
|
||
|
|
value: String(process.env.DISABLE_SIGNUPS !== 'true'),
|
||
|
|
key: INSTANCE_SYSTEM_SETTINGS.ENABLE_SIGNUP,
|
||
|
|
type: INSTANCE_SETTINGS_TYPE.SYSTEM,
|
||
|
|
helperText: 'Users will be able to sign up without being invited',
|
||
|
|
helperTextKey: 'header.organization.menus.manageSSO.generalSettings.enableSignUp',
|
||
|
|
createdAt: new Date(),
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
||
|
|
}
|