mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
* Added migration to add forder_delete column * Added new group permission * Added deleteFolder ability * Added delete folder api * Added menu icon * Added new defualt permissions of admin * Implemented folder menu and delete action * Implemented update folder name in frontend * Added folder name update feature * Refactoring code * Added specs for update and delete apis - Updated test-helper function with new permissions * Resolved failing specs * corrected method name & add count checking to delete spec * added organizationId scope * Changed toast and modal texts * Resolved a mistake * Added a check box for update permission * Now, an user can only delete folders, if he has the permission to view all apps * Edited update and delete spec cases * Added error toasts * Refactored code * Resolved PR changes - Changed permission name in the frontend - Refactored the code * capitalized all toasts - Changed error message * Fixed new user permission issue * Update a spec Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
20 lines
873 B
TypeScript
20 lines
873 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
import { GroupPermission } from '../src/entities/group_permission.entity';
|
|
|
|
export class BackfillFolderDeleteFolderUpdatePermissionsAsTruthyForAdminGroup1653474337657
|
|
implements MigrationInterface
|
|
{
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
const entityManager = queryRunner.manager;
|
|
const GroupPermissionRepostory = entityManager.getRepository(GroupPermission);
|
|
|
|
await GroupPermissionRepostory.update({ group: 'admin' }, { folderUpdate: true, folderDelete: true });
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
const entityManager = queryRunner.manager;
|
|
const GroupPermissionRepostory = entityManager.getRepository(GroupPermission);
|
|
|
|
await GroupPermissionRepostory.update({ group: 'admin' }, { folderUpdate: false, folderDelete: false });
|
|
}
|
|
}
|