Fix the new permission hook

tags/0.1.5_el5 0.1.5_el5
Daniel Berteaud 10 years ago
parent 9321182195
commit 0d486971a0
  1. 6
      root/etc/e-smith/templates/usr/share/limesurvey/application/config/config.php/25ProfileHook

@ -33,9 +33,9 @@ function hook_get_auth_webserver_profile(\$user_name) {
function hook_get_auth_webserver_permissions(\$user_name) { function hook_get_auth_webserver_permissions(\$user_name) {
if ((isset(\$_SERVER['HTTP_USER_GROUPS']) && ( if ((isset(\$_SERVER['HTTP_USER_GROUPS']) && (
in_array('admins', preg_split("/;\s?/", \$_SERVER['HTTP_USER_GROUPS'])) || in_array('admins', preg_split("/;\\s?/", \$_SERVER['HTTP_USER_GROUPS'])) ||
in_array('surveyadmins', preg_split("/;\s?/", \$_SERVER['HTTP_USER_GROUPS'])) in_array('surveyadmins', preg_split("/;\\s?/", \$_SERVER['HTTP_USER_GROUPS']))
)) || (\$login == "admin")){ )) || (\$user_name == "admin")){
return Array('superadmin' => Array('read'=>true)); return Array('superadmin' => Array('read'=>true));
} }
else{ else{

Loading…
Cancel
Save