mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-25 10:18:43 +02:00
added "test" permission check #244
This commit is contained in:
parent
fd0689bf4c
commit
385092a513
1 changed files with 4 additions and 0 deletions
|
@ -543,6 +543,9 @@ class MikrotikControllerData:
|
||||||
if not self.option_track_network_hosts:
|
if not self.option_track_network_hosts:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if "test" not in self.data["access"]:
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await asyncio.wait_for(self.lock_ping.acquire(), timeout=3)
|
await asyncio.wait_for(self.lock_ping.acquire(), timeout=3)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -728,6 +731,7 @@ class MikrotikControllerData:
|
||||||
"write" not in self.data["access"]
|
"write" not in self.data["access"]
|
||||||
or "policy" not in self.data["access"]
|
or "policy" not in self.data["access"]
|
||||||
or "reboot" not in self.data["access"]
|
or "reboot" not in self.data["access"]
|
||||||
|
or "test" not in self.data["access"]
|
||||||
):
|
):
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Mikrotik %s user %s does not have sufficient access rights. Integration functionality will be limited.",
|
"Mikrotik %s user %s does not have sufficient access rights. Integration functionality will be limited.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue