From ed6d6f69868beb18dd934d1370f839a096832b8e Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 8 Nov 2013 16:33:37 +0100 Subject: [PATCH] Grant admin privileges for the admin user, even if not member of the admins group (so admin works even without LL::NG) --- .../usr/share/limesurvey/application/config/config.php/25ProfileHook | 3 ++- 1 file changed, 2 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 160f5c4..216688f 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,8 @@ 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']))) || + (\$login == "admin")){ \$admin = 1; } else{