mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
* revise and add specs for folders * Feature: Folder create permission (#1394) * add migration for folder create permission * add backfill migration for folder create permission on admin group * adds permission for folder creation * refactor function * select distinct folders
20 lines
588 B
TypeScript
20 lines
588 B
TypeScript
import {MigrationInterface, QueryRunner, TableColumn} from "typeorm";
|
|
|
|
export class AddFolderCreatePermissionToGroupPermissions1636607624055 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.addColumn(
|
|
"group_permissions",
|
|
new TableColumn({
|
|
name: "folder_create",
|
|
type: "boolean",
|
|
default: false,
|
|
isNullable: false,
|
|
})
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.dropColumn("group_permissions", "folder_create");
|
|
}
|
|
|
|
}
|