From e0fda4811c974718613467174702af152d1c3eea Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 31 Jul 2023 01:49:03 +0200 Subject: [PATCH] fix: authorize remotely only if configured MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts | 1 - src/charging-station/ocpp/OCPPServiceUtils.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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, -- 2.34.1