Check car component only with NotAssignedToCarID + Use UserSecurity to filter users in CarSecurity
MODIFY
src/server/rest/service/UserService.ts
src/server/rest/service/UserService.ts
@@ -796,7 +796,7 @@ export default class UserService {
UtilsService.assertComponentIsActiveFromToken(req.user, TenantComponents.ORGANIZATION,
Action.READ, Entity.USER, MODULE_NAME, 'handleGetUsers');
}
- if (filteredRequest.ExcludeUserIDs || filteredRequest.NotAssignedToCarID) {
+ if (filteredRequest.NotAssignedToCarID) {
UtilsService.assertComponentIsActiveFromToken(req.user, TenantComponents.CAR,
Action.READ, Entity.USER, MODULE_NAME, 'handleGetUsers');
}

MODIFY
src/server/rest/service/security/CarSecurity.ts
src/server/rest/service/security/CarSecurity.ts
@@ -252,7 +252,7 @@ export default class CarSecurity {
}
const filteredUserCar: UserCar = {
id: userCar.id,
- user: userCar.user,
+ user: UserSecurity.filterMinimalUserResponse(userCar.user, loggedUser),
carID: userCar.carID,
userID: userCar.userID,
default: userCar.default,

Check car component only with NotAssignedToCarID + Use UserSecurity to filter users in CarSecurity