luci-base: dispatcher.lua: honour acl_depends annotations in Lua controllers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 760763a7b5
)
This commit is contained in:
parent
9ad6320876
commit
d122f1278b
1 changed files with 8 additions and 0 deletions
|
@ -324,6 +324,14 @@ local function tree_to_json(node, json)
|
|||
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
|
||||
(subnode.sysauth ~= nil and subnode.sysauth ~= false)
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue