Remove getAuthorizedCompanyIDs - it was using the companies from user token; now CompanyIDs filter is added in checkAndGetCompaniesAuthorizationFilters.
MODIFY
src/authorization/Authorizations.ts
src/authorization/Authorizations.ts
@@ -87,10 +87,6 @@ export default class Authorizations {
loggedUser, Entity.CHARGING_STATION, Action.REMOTE_STOP_TRANSACTION, context);
}
- public static getAuthorizedCompanyIDs(loggedUser: UserToken): string[] {
- return loggedUser.companies;
- }
-
public static getAuthorizedSiteIDs(loggedUser: UserToken, requestedSites: string[]): string[] {
if (!Utils.isComponentActiveFromToken(loggedUser, TenantComponents.ORGANIZATION)) {
return null;

MODIFY
src/server/rest/v1/service/CompanyService.ts
src/server/rest/v1/service/CompanyService.ts
@@ -134,7 +134,6 @@ export default class CompanyService {
{
search: filteredRequest.Search,
issuer: filteredRequest.Issuer,
- companyIDs: Authorizations.getAuthorizedCompanyIDs(req.user),
withSites: filteredRequest.WithSites,
withLogo: filteredRequest.WithLogo,
locCoordinates: filteredRequest.LocCoordinates,

Remove getAuthorizedCompanyIDs - it was using the companies from user token; now CompanyIDs filter is added in checkAndGetCompaniesAuthorizationFilters.