From: Jérôme Benoit Date: Sun, 30 Jul 2023 23:49:03 +0000 (+0200) Subject: fix: authorize remotely only if configured X-Git-Tag: v1.2.20~65 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e0fda4811c974718613467174702af152d1c3eea;p=e-mobility-charging-stations-simulator.git fix: authorize remotely only if configured Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index ad7e8e17..7599e39b 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -874,7 +874,6 @@ export class OCPP16IncomingRequestService extends OCPPIncomingRequestService { // Authorization check required if ( chargingStation.getAuthorizeRemoteTxRequests() === true && - chargingStation.getMustAuthorizeAtRemoteStart() === true && (await OCPP16ServiceUtils.isIdTagAuthorized(chargingStation, transactionConnectorId, idTag)) ) { // Authorization successful, start transaction diff --git a/src/charging-station/ocpp/OCPPServiceUtils.ts b/src/charging-station/ocpp/OCPPServiceUtils.ts index 64fe38ea..a9c5c562 100644 --- a/src/charging-station/ocpp/OCPPServiceUtils.ts +++ b/src/charging-station/ocpp/OCPPServiceUtils.ts @@ -233,7 +233,7 @@ export class OCPPServiceUtils { connectorStatus.localAuthorizeIdTag = idTag; connectorStatus.idTagLocalAuthorized = true; authorized = true; - } else { + } else if (chargingStation.getMustAuthorizeAtRemoteStart()) { authorized = await OCPPServiceUtils.isIdTagRemoteAuthorized( chargingStation, connectorId,