Fixed user Basic cannot read his own data in Car
MODIFY
src/server/rest/v1/service/CarService.ts
src/server/rest/v1/service/CarService.ts
@@ -582,7 +582,7 @@ export default class CarService {
UtilsService.assertObjectExists(action, foundUser, `User ID '${userToCheck.user.id}' does not exist`,
MODULE_NAME, 'handleAssignCarUsers', loggedUser);
// Auth
- if (!(await Authorizations.canReadUser(loggedUser)).authorized) {
+ if (!(await Authorizations.canReadUser(loggedUser, { UserID: loggedUser.id })).authorized) {
throw new AppAuthError({
errorCode: HTTPAuthError.FORBIDDEN,
user: loggedUser,

Fixed user Basic cannot read his own data in Car