[fix] Keep user info in json format

This commit is contained in:
ljf 2019-03-22 16:36:51 +01:00
parent 7396d099e6
commit 55063df424
3 changed files with 4 additions and 2 deletions

View file

@ -334,6 +334,7 @@ end
if hlp.is_logged_in() then
-- serve ynhpanel files
serveAsset("/ynh_userinfo.json", "js/ynh_userinfo.js")
serveAsset("/ynh_portal.js", "js/ynh_portal.js")
serveAsset("/ynh_overlay.css", "css/ynh_overlay.css")
-- serve theme's files

View file

@ -538,13 +538,13 @@ function get_data_for(view)
elseif view == "portal.html"
or view == "edit.html"
or view == "password.html"
or view == "ynhpanel.json" then
or view == "ynh_userinfo.json" then
-- Invalidate cache before loading these views.
-- Needed if the LDAP db is changed outside ssowat (from the cli for example).
-- Not doing it for ynhpanel.json only for performance reasons,
-- so the panel could show wrong first name, last name or main email address
if view ~= "ynhpanel.json" then
if view ~= "ynh_userinfo.json" then
delete_user_info_cache(user)
end

View file

@ -0,0 +1 @@
{}