Grant admin privileges for members of the special surveyadmins group

This commit is contained in:
Daniel Berteaud 2013-12-03 18:49:12 +01:00
parent a659f612bb
commit 359bb106ac
1 changed files with 4 additions and 1 deletions

View File

@ -22,7 +22,10 @@ function hook_get_auth_webserver_profile(\$user_name) {
else{
\$email = \$login . '\@$DomainName';
}
if ((isset(\$_SERVER['HTTP_USER_GROUPS']) && in_array('admins', preg_split("/; /", \$_SERVER['HTTP_USER_GROUPS']))) ||
if ((isset(\$_SERVER['HTTP_USER_GROUPS']) && (
in_array('admins', preg_split("/; /", \$_SERVER['HTTP_USER_GROUPS'])) ||
in_array('surveyadmins', preg_split("/; /", \$_SERVER['HTTP_USER_GROUPS']))
)) ||
(\$login == "admin")){
\$admin = 1;
}