Verified Commit 6335e6c6 authored by Karel Koci's avatar Karel Koci 🤘
Browse files

Run user list's script only once

Running same Script multiple times is invalid.
parent 8a14fbd7
Pipeline #5377 passed with stage
in 14 minutes and 6 seconds
......@@ -85,10 +85,16 @@ if uci and base_url then
if type(lists) == "string" then
lists = {lists}
end
local exec_list = {}
if type(lists) == "table" then
for _, l in ipairs(lists) do
-- TODO: Make restricted security work
Script("userlist-" .. l, base_url .. "userlists/" .. l .. ".lua", script_options)
if exec_list[l] then
WARN("User list " .. l .. " specified multiple times")
else
-- TODO: Make restricted security work
Script("userlist-" .. l, base_url .. "userlists/" .. l .. ".lua", script_options)
exec_list[l] = true
end
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment