-
-
Notifications
You must be signed in to change notification settings - Fork 573
Open
Description
I updated to 4.4.1 in early January and notice that request filter handling changed. In some controllers, it is necessary to add additional filters before handing the request off to the service for database operations (e.g. to add authorization criteria to the database query). Below is an example of how I implemented this prior to 4.3.x.
@Override()
async getMany(@ParsedRequest() req: CrudRequest, @User() user: User) {
// Simulating user only having access to remoteId == 10
req.parsed.filter.push({
field: 'remoteId',
operator: '$eq',
value: user.remoteId,
});
return await this.base.getManyBase(req);
}
After upgrading to 4.4.1, I notice that these filter conditions are not incorporated when generating the database query. I tracked the change down to this commit 7026039.
I have created a demonstration repository demonstrating the issue: https://github.com/iamjoeker/crud_filter_change_poc
idhard
Metadata
Metadata
Assignees
Labels
No labels