In dto, it would be nice to be able to validate that the user that sent the request has some permission on the resource id passed in the body.
For example:
export class MyDto {
@IsDefined()
@IsInt()
@HasAccess({ resource: DataSources, action: AccessActions.Update })
dataSourceId: number;
}
This may be doable with a global guard.
This would allow us to have routes that are less nested are cleaner.
In dto, it would be nice to be able to validate that the user that sent the request has some permission on the resource id passed in the body.
For example:
This may be doable with a global guard.
This would allow us to have routes that are less nested are cleaner.