diff --git a/data/config/apt/99openwb b/data/config/apt/99openwb index 89730af5f7..ae39e51694 100644 --- a/data/config/apt/99openwb +++ b/data/config/apt/99openwb @@ -1,7 +1,11 @@ -# openwb-version:1 +# openwb-version:2 # may speedup booting Acquire::http::Timeout "10"; Acquire::ftp::Timeout "10"; # keep system light and clean APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false"; +Dpkg::Options { + "--force-confold"; + "--force-confdef"; +}; diff --git a/packages/helpermodules/subdata.py b/packages/helpermodules/subdata.py index 38b26d5490..7d4d356d29 100644 --- a/packages/helpermodules/subdata.py +++ b/packages/helpermodules/subdata.py @@ -277,7 +277,8 @@ def process_vehicle_topic(self, client: mqtt.Client, var: Dict[str, ev.Ev], msg: if decode_payload(msg.payload) == "": if re.search("/vehicle/[0-9]+/soc_module/config$", msg.topic) is not None: var["ev"+index].soc_module = None - remove_acl_role("vehicle--write-access", int(index)) + if self.system_data["system"].data["security"]["user_management_active"]: + remove_acl_role("vehicle--write-access", int(index)) elif re.search("/vehicle/[0-9]+/get", msg.topic) is not None: self.set_json_payload_class(var["ev"+index].data.get, msg) else: @@ -502,10 +503,10 @@ def process_chargepoint_config_topic(self, var: Dict[str, chargepoint.CpTemplate self.event_start_internal_chargepoint.set() if (payload["type"] == "external_openwb"): new_ip = payload["configuration"].get("ip_address", None) - if old_ip != new_ip: + if self.system_data["system"].data["security"]["user_management_active"] and old_ip != new_ip: log.debug(f"IP of chargepoint {index} changed, modifying display user") if old_ip is not None: - # check if ip is used in other chargepoints, if not remove display user + # check if ip is used in other charge points, if not remove display user for cp in var: if ( var[cp].chargepoint.data.config.configuration.get("ip_address", None) == old_ip