mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Refactors user_scripts into checks (lua)
This commit is contained in:
parent
3c3aa5a25f
commit
76fd315d1b
222 changed files with 980 additions and 981 deletions
|
|
@ -9,11 +9,11 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|||
|
||||
require "lua_utils"
|
||||
local json = require("dkjson")
|
||||
local user_scripts = require("user_scripts")
|
||||
local checks = require("checks")
|
||||
local rest_utils = require "rest_utils"
|
||||
local auth = require "auth"
|
||||
|
||||
if not auth.has_capability(auth.capabilities.user_scripts) then
|
||||
if not auth.has_capability(auth.capabilities.checks) then
|
||||
rest_utils.answer(rest_utils.consts.err.not_granted)
|
||||
return
|
||||
end
|
||||
|
|
@ -27,8 +27,8 @@ if(subdir == nil) then
|
|||
return
|
||||
end
|
||||
|
||||
local script_type = user_scripts.script_types[subdir]
|
||||
local configset = user_scripts.getConfigset()
|
||||
local script_type = checks.script_types[subdir]
|
||||
local configset = checks.getConfigset()
|
||||
local rv = {}
|
||||
|
||||
-- Only return the essential information
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue