luci-base: dispatcher.lua: honour acl_depends annotations in Lua controllers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
f76a020db1
commit
760763a7b5
1 changed files with 8 additions and 0 deletions
|
@ -324,6 +324,14 @@ local function tree_to_json(node, json)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if type(subnode.acl_depends) == "table" then
|
||||||
|
for _, acl in ipairs(subnode.acl_depends) do
|
||||||
|
spec.depends = spec.depends or {}
|
||||||
|
spec.depends.acl = spec.depends.acl or {}
|
||||||
|
spec.depends.acl[#spec.depends.acl + 1] = acl
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if (subnode.sysauth_authenticator ~= nil) or
|
if (subnode.sysauth_authenticator ~= nil) or
|
||||||
(subnode.sysauth ~= nil and subnode.sysauth ~= false)
|
(subnode.sysauth ~= nil and subnode.sysauth ~= false)
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue