fix: authorize remotely only if configured
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 30 Jul 2023 23:49:03 +0000 (01:49 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 30 Jul 2023 23:49:03 +0000 (01:49 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
src/charging-station/ocpp/OCPPServiceUtils.ts

index ad7e8e17ed94d2396700cc66056dc7206f69620a..7599e39b0101f777ca8aaa26338d2a591a7accbf 100644 (file)
@@ -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
index 64fe38eaacdc39f7d45745cf89c743abd8ab4a58..a9c5c562ea18c47e4d88470ca2a54831736af31a 100644 (file)
@@ -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,