Allow integration to run with limited access rights #235

This commit is contained in:
Tomaae 2022-08-20 01:43:54 +02:00
parent 58f931ad8e
commit 9667dcc171
No known key found for this signature in database
GPG key ID: 8360BBD8A381D1C0

View file

@ -1528,7 +1528,11 @@ class MikrotikControllerData:
# ---------------------------
def get_firmware_update(self):
"""Check for firmware update on Mikrotik"""
if "write" not in self.data["access"] or "policy" not in self.data["access"]:
if (
"write" not in self.data["access"]
or "policy" not in self.data["access"]
or "reboot" not in self.data["access"]
):
return
self.execute("/system/package/update", "check-for-updates", None, None)