mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-12 23:14:35 +02:00
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:
parent
c39721de96
commit
30d60a72ad
12 changed files with 115 additions and 38 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue