Fix the new permission hook

This commit is contained in:
Daniel Berteaud 2015-01-16 12:11:21 +01:00
parent 9321182195
commit 0d486971a0
1 changed files with 3 additions and 3 deletions

View File

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