Avoid lua error in helpers.lua: for url, name in pairs(conf["users"][user]) do

This commit is contained in:
Y 2017-09-17 18:23:32 +02:00
parent 1d3ee78cba
commit a0d143aad9

View file

@ -540,6 +540,7 @@ function get_data_for(view)
-- Add user's accessible URLs using the ACLs. -- Add user's accessible URLs using the ACLs.
-- It is typically used to build the app list. -- It is typically used to build the app list.
if conf["users"][user] then
for url, name in pairs(conf["users"][user]) do for url, name in pairs(conf["users"][user]) do
if ngx.var.host == conf["local_portal_domain"] then if ngx.var.host == conf["local_portal_domain"] then
@ -550,6 +551,7 @@ function get_data_for(view)
table.insert(data["app"], index_of(sorted_apps, name), { url = url, name = name }) table.insert(data["app"], index_of(sorted_apps, name), { url = url, name = name })
end end
end end
end
-- Pass all the translated strings to the view (to use with t_<key>) -- Pass all the translated strings to the view (to use with t_<key>)
for k, v in pairs(i18n[conf["default_language"]]) do for k, v in pairs(i18n[conf["default_language"]]) do