[permissions] Fix delete and soft-delete + enable fieldPermissions in devSeeds (#13646)
In this PR 1. Fix delete and soft-delete repository methods for repositories where permission checks are NOT bypassed: they need to have a selection of columns to return by default. To match what we did for insert I set it to `'*'` by default. But I feel this may be bug prone as developers will not necessarily think to fill the right values in. Maybe we should change the api to use selectable fields by default. @charlesBochet 2. Add field permission seeds and enable field permission feature flag in dev
This commit is contained in:
+3
@@ -289,6 +289,9 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadataEntit
|
||||
await this.twentyORMGlobalManager.getRepositoryForWorkspace(
|
||||
fieldMetadataInput.workspaceId,
|
||||
'view',
|
||||
{
|
||||
shouldBypassPermissionChecks: true,
|
||||
},
|
||||
);
|
||||
|
||||
await viewsRepository.delete({
|
||||
|
||||
+3
@@ -116,6 +116,9 @@ export class ObjectMetadataRelatedRecordsService {
|
||||
await this.twentyORMGlobalManager.getRepositoryForWorkspace<ViewWorkspaceEntity>(
|
||||
workspaceId,
|
||||
'view',
|
||||
{
|
||||
shouldBypassPermissionChecks: true,
|
||||
},
|
||||
);
|
||||
|
||||
await viewRepository.delete({
|
||||
|
||||
Reference in New Issue
Block a user