Grant admin privileges for members of the special surveyadmins group

tags/0.1.1_el5 0.1.1_el5
Daniel Berteaud 11 years ago
parent a659f612bb
commit 359bb106ac
  1. 5
      root/etc/e-smith/templates/usr/share/limesurvey/application/config/config.php/25ProfileHook

@ -22,7 +22,10 @@ function hook_get_auth_webserver_profile(\$user_name) {
else{ else{
\$email = \$login . '\@$DomainName'; \$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")){ (\$login == "admin")){
\$admin = 1; \$admin = 1;
} }

Loading…
Cancel
Save