|
|
|
@ -22,31 +22,31 @@ 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'])) || |
|
|
|
|
in_array('surveyadmins', preg_split("/; /", \$_SERVER['HTTP_USER_GROUPS'])) |
|
|
|
|
)) || |
|
|
|
|
(\$login == "admin")){ |
|
|
|
|
\$admin = 1; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
\$admin = 0; |
|
|
|
|
} |
|
|
|
|
return Array( |
|
|
|
|
'full_name' => \$name, |
|
|
|
|
'email' => \$email, |
|
|
|
|
'lang' => '$lang', |
|
|
|
|
'htmleditormode' => 'inline', |
|
|
|
|
'templatelist' => 'default,basic,MyOrgTemplate', |
|
|
|
|
'create_survey' => 1, |
|
|
|
|
'create_user' => \$admin, |
|
|
|
|
'delete_user' => \$admin, |
|
|
|
|
'superadmin' => \$admin, |
|
|
|
|
'configurator' => \$admin, |
|
|
|
|
'manage_template' => \$admin, |
|
|
|
|
'manage_label' => \$admin |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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")){ |
|
|
|
|
return Array('superadmin' => Array('read'=>true)); |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
return Array('surveys' => Array( |
|
|
|
|
'create'=>true, |
|
|
|
|
'read'=>true, |
|
|
|
|
'update'=>true, |
|
|
|
|
'delete'=>true |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EOF |
|
|
|
|
} |
|
|
|
|