From 359bb106acc46060d84ba8f6bf3aaef5070b8f1a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 3 Dec 2013 18:49:12 +0100 Subject: [PATCH] Grant admin privileges for members of the special surveyadmins group --- .../usr/share/limesurvey/application/config/config.php/25ProfileHook | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/templates/usr/share/limesurvey/application/config/config.php/25ProfileHook b/root/etc/e-smith/templates/usr/share/limesurvey/application/config/config.php/25ProfileHook index 216688f..cca4d2b 100644 --- a/root/etc/e-smith/templates/usr/share/limesurvey/application/config/config.php/25ProfileHook +++ b/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{ \$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; }