Added Created / Last Changed in car list
MODIFY
src/server/rest/service/security/CarSecurity.ts
src/server/rest/service/security/CarSecurity.ts
@@ -241,6 +241,8 @@ export default class CarSecurity {
filteredCar.carCatalog = forList ? this.filterMinimalCarCatalogResponse(car.carCatalog, loggedUser) :
this.filterCarCatalogResponse(car.carCatalog, loggedUser);
}
+ UtilsSecurity.filterCreatedAndLastChanged(
+ filteredCar, car, loggedUser);
return filteredCar;
}

MODIFY
src/server/rest/service/security/UtilsSecurity.ts
src/server/rest/service/security/UtilsSecurity.ts
@@ -124,7 +124,7 @@ export default class UtilsSecurity {
return filteredAddress;
}
- static filterCreatedAndLastChanged(filteredEntity, entity, loggedUser: UserToken): void {
+ static filterCreatedAndLastChanged(filteredEntity: any, entity: any, loggedUser: UserToken): void {
if (entity.createdBy && typeof entity.createdBy === 'object' &&
entity.createdBy.id && Authorizations.canReadUser(loggedUser, entity.createdBy.id)) {
// Build user

Added Created / Last Changed in car list