Move user group information into the session

This fixes issues and inconsistencies when the same user logins from different authenticators at the same time
Fixes #2212
This commit is contained in:
emanuele-f 2018-12-11 18:44:34 +01:00
parent 6dcc996198
commit f65c618b3f
14 changed files with 191 additions and 228 deletions

View file

@ -13,8 +13,9 @@ local old_password = _POST["old_password"]
local new_password = _POST["new_password"]
local confirm_new_password = _POST["confirm_password"]
user_group = ntop.getUserGroup()
if(user_group == "administrator") then
local is_admin = isAdministrator()
if(is_admin) then
old_password = ""
else
-- Check to avoid that this user changes password for other users