Improved login errors,

Added user disable option,
Fix groups selection in tasks,
Improved Auto updater,
Fixed sorting of scan reports,
Some pro feature
This commit is contained in:
sepehr 2024-08-26 11:22:04 +03:30
parent c39721de96
commit 30d60a72ad
12 changed files with 115 additions and 38 deletions

View file

@ -1106,13 +1106,17 @@ def sizeof_fmt(num, suffix="B"):
num /= 1024.0
return f"{num:.1f}Yi{suffix}"
def get_local_users(opts):
def get_local_users(opts,router=False,full=False):
try:
router=RouterOSCheckResource(opts)
if not router:
router=RouterOSCheckResource(opts)
call = router.api.path(
"/user"
)
results=[a['name'] for a in tuple(call)]
if not full:
results=[a['name'] for a in tuple(call)]
else:
results=tuple(call)
return results
except Exception as e:
log.error(e)