2016-10-15 19:57:04 +02:00
<!DOCTYPE html>
< html lang = "en" dir = "ltr" >
< head >
< meta charset = "utf-8" / >
< title > documentation:2.0:applications:limesurvey< / title >
< meta name = "generator" content = "DokuWiki" / >
2017-02-22 13:41:23 +01:00
< meta name = "robots" content = "index,follow" / >
2016-10-15 19:57:04 +02:00
< meta name = "keywords" content = "documentation,2.0,applications,limesurvey" / >
< link rel = "search" type = "application/opensearchdescription+xml" href = "../lib/exe/opensearch.html" title = "LemonLDAP::NG" / >
< link rel = "start" href = "limesurvey.html" / >
< link rel = "contents" href = "limesurvey.html" title = "Sitemap" / >
< link rel = "stylesheet" type = "text/css" href = "../lib/exe/css.php.t.bootstrap3.css" / >
2017-02-07 17:35:26 +01:00
<!-- //if:usedebianlibs
< link rel = "stylesheet" type = "text/css" href = "/javascript/bootstrap/css/bootstrap.min.css" / >
//elsif:useexternallibs
< link rel = "stylesheet" type = "text/css" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" > < / script >
//elsif:cssminified
< link rel = "stylesheet" type = "text/css" href = "/static/bwr/bootstrap/dist/css/bootstrap.min.css" / >
//else -->
< link rel = "stylesheet" type = "text/css" href = "/static/bwr/bootstrap/dist/css/bootstrap.css" / >
<!-- //endif -->
2016-10-15 19:57:04 +02:00
< script type = "text/javascript" > / * < ! [ C D A T A [ * / v a r N S = ' d o c u m e n t a t i o n : 2 . 0 : a p p l i c a t i o n s ' ; v a r J S I N F O = { " i d " : " d o c u m e n t a t i o n : 2 . 0 : a p p l i c a t i o n s : l i m e s u r v e y " , " n a m e s p a c e " : " d o c u m e n t a t i o n : 2 . 0 : a p p l i c a t i o n s " } ;
/*!]]>*/< / script >
< script type = "text/javascript" charset = "utf-8" src = "../lib/exe/js.php.t.bootstrap3.js" > < / script >
2017-02-07 17:35:26 +01:00
<!-- //if:usedebianlibs
< script type = "text/javascript" src = "/javascript/jquery/jquery.min.js" > < / script >
//elsif:useexternallibs
< script type = "text/javascript" src = "http://code.jquery.com/jquery-2.2.0.min.js" > < / script >
//elsif:jsminified
< script type = "text/javascript" src = "/static/bwr/jquery/dist/jquery.min.js" > < / script >
//else -->
< script type = "text/javascript" src = "/static/bwr/jquery/dist/jquery.js" > < / script >
<!-- //endif -->
<!-- //if:usedebianlibs
< script type = "text/javascript" src = "/javascript/jquery-ui/jquery-ui.min.js" > < / script >
//elsif:useexternallibs
< script type = "text/javascript" src = "http://code.jquery.com/ui/1.10.4/jquery-ui.min.js" > < / script >
//elsif:jsminified
2018-03-08 13:29:31 +01:00
< script type = "text/javascript" src = "/static/bwr/jquery-ui/jquery-ui.min.js" > < / script >
2017-02-07 17:35:26 +01:00
//else -->
2018-03-08 13:29:31 +01:00
< script type = "text/javascript" src = "/static/bwr/jquery-ui/jquery-ui.js" > < / script >
2017-02-07 17:35:26 +01:00
<!-- //endif -->
2016-10-15 19:57:04 +02:00
< / head >
< body >
< div class = "dokuwiki export container" >
<!-- TOC START -->
< div id = "dw__toc" >
< h3 class = "toggle" > Table of Contents< / h3 >
< div >
< ul class = "toc" >
< li class = "level1" > < div class = "li" > < a href = "#presentation" > Presentation< / a > < / div > < / li >
2018-01-26 10:35:45 +01:00
< li class = "level1" > < div class = "li" > < a href = "#http_headers" > HTTP Headers< / a > < / div >
2016-10-15 19:57:04 +02:00
< ul class = "toc" >
< li class = "level2" > < div class = "li" > < a href = "#limesurvey_configuration" > LimeSurvey configuration< / a > < / div > < / li >
< li class = "level2" > < div class = "li" > < a href = "#limesurvey_virtual_host" > LimeSurvey virtual host< / a > < / div > < / li >
< li class = "level2" > < div class = "li" > < a href = "#limesurvey_virtual_host_in_manager" > LimeSurvey virtual host in Manager< / a > < / div >
< ul class = "toc" >
< li class = "level3" > < div class = "li" > < a href = "#headers" > Headers< / a > < / div > < / li >
< li class = "level3" > < div class = "li" > < a href = "#rules" > Rules< / a > < / div > < / li >
< / ul > < / li >
< / ul > < / li >
< / ul >
< / div >
< / div >
<!-- TOC END -->
< h1 class = "sectionedit1" id = "limesurvey" > LimeSurvey< / h1 >
< div class = "level1" >
< p >
< a href = "limesurvey_logo.png_documentation_2.0_applications_limesurvey.html" class = "media" title = "applications:limesurvey_logo.png" > < img src = "limesurvey_logo.png" class = "mediacenter" alt = "" / > < / a >
< / p >
< / div >
<!-- EDIT1 SECTION "LimeSurvey" [1 - 70] -->
< h2 class = "sectionedit2" id = "presentation" > Presentation< / h2 >
< div class = "level2" >
< p >
2018-01-26 10:35:45 +01:00
< a href = "http://www.limesurvey.org" class = "urlextern" title = "http://www.limesurvey.org" rel = "nofollow" > LimeSurvey< / a > is a web survey software written in PHP.
2016-10-15 19:57:04 +02:00
< / p >
2018-01-26 10:35:45 +01:00
< / div >
<!-- EDIT2 SECTION "Presentation" [71 - 180] -->
< h2 class = "sectionedit3" id = "http_headers" > HTTP Headers< / h2 >
< div class = "level2" >
2016-10-15 19:57:04 +02:00
< p >
2018-01-26 10:35:45 +01:00
LimeSurvey has a webserver authentication mode that allows one to integrate it directly into LemonLDAP::NG.
2016-10-15 19:57:04 +02:00
< / p >
2018-01-26 10:35:45 +01:00
< p >
To have a stronger integration, we will configure LimeSurvey to autocreate unknown users and use HTTP headers to fill name and mail.
< / p >
2016-10-15 19:57:04 +02:00
< div class = "noteclassic" > We suppose that LimeSurvey is installed in /var/www/html/limesurvey
< / div >
< / div >
2018-01-26 10:35:45 +01:00
<!-- EDIT3 SECTION "HTTP Headers" [181 - 531] -->
2016-10-15 19:57:04 +02:00
< h3 class = "sectionedit4" id = "limesurvey_configuration" > LimeSurvey configuration< / h3 >
< div class = "level3" >
< p >
2018-01-26 10:35:45 +01:00
In Administration panel, go in Configuration > Parameters > Extensions manager. Select the WebServer module and configure it.
< / p >
< p >
< img src = "screenshot_limesurvey_configuration.png" class = "mediacenter" title = "
" alt="
" />
2016-10-15 19:57:04 +02:00
< / p >
2018-01-26 10:35:45 +01:00
< p >
This is enough for the authentication part.
< / p >
< div class = "notetip" > If you are blocked, you can deactivate the plugin with this request in database:
< pre class = "code" > update lime_plugins SET active=0 where name=" Authwebserver" ;< / pre >
2016-10-15 19:57:04 +02:00
< / div >
2018-01-26 10:35:45 +01:00
< p >
To configure account autocreation, you need to edit application/config/config.php:
The configuration is done in config.php:
< / p >
< pre class = "code" > vi /var/www/html/limesurvey/application/config/config.php< / pre >
< pre class = "code file php" > < span class = "st_h" > 'config'< / span > < span class = "sy0" > => < / span > < a href = "http://www.php.net/array" > < span class = "kw3" > array< / span > < / a > < span class = "br0" > ( < / span >
< span class = "co1" > // debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this< / span >
< span class = "co1" > // then please check your error-logs - either in your hosting provider admin panel or in some /logs directory< / span >
< span class = "co1" > // on your webspace.< / span >
< span class = "co1" > // LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates< / span >
< span class = "st_h" > 'debug'< / span > < span class = "sy0" > => < / span > < span class = "nu0" > 0< / span > < span class = "sy0" > ,< / span >
< span class = "st_h" > 'debugsql'< / span > < span class = "sy0" > => < / span > < span class = "nu0" > 0< / span > < span class = "sy0" > ,< / span > < span class = "co1" > // Set this to 1 to enanble sql logging, only active when debug = 2< / span >
< span class = "co1" > // Update default LimeSurvey config here< / span >
< span class = "st_h" > 'auth_webserver_autocreate_user'< / span > < span class = "sy0" > => < / span > < span class = "kw4" > true< / span > < span class = "sy0" > ,< / span >
< span class = "st_h" > 'auth_webserver_autocreate_profile'< / span > < span class = "sy0" > => < / span > < a href = "http://www.php.net/array" > < span class = "kw3" > Array< / span > < / a > < span class = "br0" > ( < / span > < span class = "st_h" > 'full_name'< / span > < span class = "sy0" > => < / span > < span class = "re0" > $_SERVER< / span > < span class = "br0" > [ < / span > < span class = "st_h" > 'HTTP_AUTH_CN'< / span > < span class = "br0" > ] < / span > < span class = "sy0" > ,< / span > < span class = "st_h" > 'email'< / span > < span class = "sy0" > => < / span > < span class = "re0" > $_SERVER< / span > < span class = "br0" > [ < / span > < span class = "st_h" > 'HTTP_AUTH_MAIL'< / span > < span class = "br0" > ] < / span > < span class = "sy0" > ,< / span > < span class = "st_h" > 'lang'< / span > < span class = "sy0" > => < / span > < span class = "st_h" > 'en'< / span > < span class = "br0" > ) < / span > < span class = "sy0" > ,< / span >
< span class = "st_h" > 'auth_webserver_autocreate_permissions'< / span > < span class = "sy0" > => < / span > < a href = "http://www.php.net/array" > < span class = "kw3" > Array< / span > < / a > < span class = "br0" > ( < / span > < span class = "st_h" > 'surveys'< / span > < span class = "sy0" > => < / span > < a href = "http://www.php.net/array" > < span class = "kw3" > array< / span > < / a > < span class = "br0" > ( < / span > < span class = "st_h" > 'create'< / span > < span class = "sy0" > => < / span > < span class = "kw4" > true< / span > < span class = "sy0" > ,< / span > < span class = "st_h" > 'read'< / span > < span class = "sy0" > => < / span > < span class = "kw4" > false< / span > < span class = "sy0" > ,< / span > < span class = "st_h" > 'update'< / span > < span class = "sy0" > => < / span > < span class = "kw4" > false< / span > < span class = "sy0" > ,< / span > < span class = "st_h" > 'delete'< / span > < span class = "sy0" > => < / span > < span class = "kw4" > false< / span > < span class = "br0" > ) < / span > < span class = "br0" > ) < / span > < span class = "sy0" > ,< / span >
< span class = "br0" > ) < / span > < / pre >
< p >
See also < a href = "https://manual.limesurvey.org/Optional_settings#Authentication_delegation_with_automatic_user_import" class = "urlextern" title = "https://manual.limesurvey.org/Optional_settings#Authentication_delegation_with_automatic_user_import" rel = "nofollow" > https://manual.limesurvey.org/Optional_settings#Authentication_delegation_with_automatic_user_import< / a >
< / p >
2016-10-15 19:57:04 +02:00
< / div >
2018-01-26 10:35:45 +01:00
<!-- EDIT4 SECTION "LimeSurvey configuration" [532 - 2298] -->
2016-10-15 19:57:04 +02:00
< h3 class = "sectionedit5" id = "limesurvey_virtual_host" > LimeSurvey virtual host< / h3 >
< div class = "level3" >
< p >
Configure LimeSurvey virtual host like other < a href = "../configvhost.html" class = "wikilink1" title = "documentation:2.0:configvhost" > protected virtual host< / a > .
< / p >
< / div >
2018-01-26 10:35:45 +01:00
<!-- EDIT5 SECTION "LimeSurvey virtual host" [2299 - 2422] -->
2016-10-15 19:57:04 +02:00
< h3 class = "sectionedit6" id = "limesurvey_virtual_host_in_manager" > LimeSurvey virtual host in Manager< / h3 >
< div class = "level3" >
< p >
Go to the Manager and < a href = "../configvhost.html#lemonldapng_configuration" class = "wikilink1" title = "documentation:2.0:configvhost" > create a new virtual host< / a > for LimeSurvey.
< / p >
< / div >
< h4 id = "headers" > Headers< / h4 >
< div class = "level4" >
< div class = "table sectionedit7" > < table class = "inline table table-bordered table-striped" >
< thead >
< tr class = "row0 roweven" >
< th class = "col0 centeralign" > Header name < / th > < th class = "col1 centeralign" > Description < / th >
< / tr >
< / thead >
< tr class = "row1 rowodd" >
< td class = "col0 centeralign" > Auth-User < / td > < td class = "col1 centeralign" > user login < / td >
< / tr >
< tr class = "row2 roweven" >
< td class = "col0 centeralign" > Auth-Cn < / td > < td class = "col1 centeralign" > user full name < / td >
< / tr >
< tr class = "row3 rowodd" >
< td class = "col0 centeralign" > Auth-Mail < / td > < td class = "col1 centeralign" > user email < / td >
< / tr >
< / table > < / div >
2018-01-26 10:35:45 +01:00
<!-- EDIT7 TABLE [2595 - 2723] -->
2016-10-15 19:57:04 +02:00
< / div >
< h4 id = "rules" > Rules< / h4 >
< div class = "level4" >
< div class = "table sectionedit8" > < table class = "inline table table-bordered table-striped" >
< thead >
< tr class = "row0 roweven" >
< th class = "col0 centeralign" > Rule name < / th > < th class = "col1 centeralign" > Expression < / th > < th class = "col2 centeralign" > Description < / th >
< / tr >
< / thead >
< tr class = "row1 rowodd" >
2018-01-26 10:35:45 +01:00
< td class = "col0 centeralign" > Logout < / td > < td class = "col1 centeralign" > /sa/logout$ < / td > < td class = "col2 centeralign" > Logout rule (for example logout_app_sso) < / td >
2016-10-15 19:57:04 +02:00
< / tr >
< tr class = "row2 roweven" >
2018-01-26 10:35:45 +01:00
< td class = "col0 centeralign" > Admin < / td > < td class = "col1 centeralign" > ^/(index\.php/)?admin < / td > < td class = "col2 centeralign" > Allow only admin and superadmin users < / td >
2016-10-15 19:57:04 +02:00
< / tr >
< tr class = "row3 rowodd" >
< td class = "col0 centeralign" > Default < / td > < td class = "col1 centeralign" > default < / td > < td class = "col2 centeralign" > Allow only users with a LimeSurvey role < / td >
< / tr >
< / table > < / div >
2018-01-26 10:35:45 +01:00
<!-- EDIT8 TABLE [2740 - 3024] --> < div class = "notetip" > You can set the default access to:< ul >
2016-10-15 19:57:04 +02:00
< li class = "level1" > < div class = "li" > < strong > accept< / strong > : all authenticated users will access surveys< / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > unprotect< / strong > : no authentication will be asked to access surveys < / div >
< / li >
< / ul >
< / div >
< / div >
2018-01-26 10:35:45 +01:00
<!-- EDIT6 SECTION "LimeSurvey virtual host in Manager" [2423 - ] --> < / div >
2016-10-15 19:57:04 +02:00
< / body >
< / html >