Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
Daniel Berteaud | 7b6cbbffac | |
Daniel Berteaud | 7399d228c6 | |
Daniel Berteaud | 96457a300d | |
Daniel Berteaud | 6e9820bfd6 | |
Daniel Berteaud | 152c1d08f1 | |
Daniel Berteaud | 29f2690d33 | |
Daniel Berteaud | 6fc63e7980 | |
Daniel Berteaud | 82c7e91444 | |
Daniel Berteaud | 6c2188e568 |
|
@ -11,9 +11,7 @@ my $auth = (($limesurvey{'Authentication'} || 'http') eq 'http') ? "AuthName \"L
|
|||
|
||||
if ($limesurvey{'status'} eq 'enabled'){
|
||||
|
||||
my $path = ($alias eq '') ? '' : 'limesurvey/';
|
||||
|
||||
$OUT .=<<"END"
|
||||
$OUT .=<<"END";
|
||||
|
||||
# LimeSurvey Configuration
|
||||
$alias
|
||||
|
@ -39,15 +37,24 @@ $alias
|
|||
allow from $allow
|
||||
Satisfy all
|
||||
</Directory>
|
||||
<LocationMatch "^/$path(index\.php/)?admin">
|
||||
END
|
||||
|
||||
if ($alias ne ''){
|
||||
$OUT .=<<"END";
|
||||
<LocationMatch "^/limesurvey/(index\.php/)?admin">
|
||||
SSLRequireSSL on
|
||||
$auth
|
||||
</LocationMatch>
|
||||
END
|
||||
|
||||
}
|
||||
$OUT .=<<'END';
|
||||
<DirectoryMatch "/usr/share/limesurvey/(framework|console|installer/sql|locale|application/(logs|config)|docs)">
|
||||
Deny from all
|
||||
</DirectoryMatch>
|
||||
|
||||
END
|
||||
|
||||
}
|
||||
else{
|
||||
$OUT .= "# LimeSurvey is disabled\n";
|
||||
|
|
|
@ -5,32 +5,30 @@ $lang = substr $lang, 0, 2;
|
|||
|
||||
$OUT .=<<"EOF";
|
||||
|
||||
if (!function_exists('hook_get_auth_webserver_profile')){
|
||||
function hook_get_auth_webserver_profile(\$user_name) {
|
||||
if (!isset(\$_SERVER['REMOTE_USER'])){
|
||||
return false;
|
||||
}
|
||||
\$login = \$_SERVER['REMOTE_USER'];
|
||||
if (isset(\$_SERVER['HTTP_USER_NAME'])){
|
||||
\$name = \$_SERVER['HTTP_USER_NAME'];
|
||||
}
|
||||
else{
|
||||
\$name = \$login;
|
||||
}
|
||||
if (isset(\$_SERVER['HTTP_USER_EMAIL'])){
|
||||
\$email = \$_SERVER['HTTP_USER_EMAIL'];
|
||||
}
|
||||
else{
|
||||
\$email = \$login . '\@$DomainName';
|
||||
}
|
||||
return Array(
|
||||
'full_name' => \$name,
|
||||
'email' => \$email,
|
||||
'lang' => '$lang',
|
||||
'htmleditormode' => 'inline',
|
||||
'templatelist' => 'default,basic,MyOrgTemplate',
|
||||
);
|
||||
function hook_get_auth_webserver_profile(\$user_name) {
|
||||
if (!isset(\$_SERVER['REMOTE_USER'])){
|
||||
return false;
|
||||
}
|
||||
\$login = \$_SERVER['REMOTE_USER'];
|
||||
if (isset(\$_SERVER['HTTP_USER_NAME'])){
|
||||
\$name = \$_SERVER['HTTP_USER_NAME'];
|
||||
}
|
||||
else{
|
||||
\$name = \$login;
|
||||
}
|
||||
if (isset(\$_SERVER['HTTP_USER_EMAIL'])){
|
||||
\$email = \$_SERVER['HTTP_USER_EMAIL'];
|
||||
}
|
||||
else{
|
||||
\$email = \$login . '\@$DomainName';
|
||||
}
|
||||
return Array(
|
||||
'full_name' => \$name,
|
||||
'email' => \$email,
|
||||
'lang' => '$lang',
|
||||
'htmleditormode' => 'inline',
|
||||
'templatelist' => 'default,basic,MyOrgTemplate',
|
||||
);
|
||||
}
|
||||
|
||||
if (!function_exists('hook_get_auth_webserver_permissions')){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%define name smeserver-limesurvey
|
||||
%define version 0.1.5
|
||||
%define version 0.1.10
|
||||
%define release 1
|
||||
Summary: SME server integration of limesurvey
|
||||
Name: %{name}
|
||||
|
@ -22,6 +22,22 @@ AutoReqProv: no
|
|||
Integration of LimeSurvey on SME Server
|
||||
|
||||
%changelog
|
||||
* Wed Jan 4 2017 Daniel Berteaud <daniel@firewall-services.com> 0.1.10-1.sme
|
||||
- Fix httpd template when alias is enabled
|
||||
|
||||
* Mon Dec 12 2016 Daniel Berteaud <daniel@firewall-services.com> 0.1.9-1.sme
|
||||
- Fix syntax error introduced in previous commit
|
||||
|
||||
* Sun Dec 11 2016 Daniel Berteaud <daniel@firewall-services.com> 0.1.8-1.sme
|
||||
- Fix LocationMatch scope when using a dedicated vhost
|
||||
|
||||
* Tue Apr 12 2016 Daniel Berteaud <daniel@firewall-services.com> 0.1.7-1.sme
|
||||
- Always define hook_get_auth_webserver_profile function or profile
|
||||
will fallback to the default one
|
||||
|
||||
* Wed Dec 23 2015 Daniel Berteaud <daniel@firewall-services.com> 0.1.6-1.sme
|
||||
- Make sure hooks are declared just once
|
||||
|
||||
* Fri Jan 16 2015 Daniel Berteaud <daniel@firewall-services.com> 0.1.5-1.sme
|
||||
- Fix the new permission hook
|
||||
|
||||
|
@ -54,12 +70,11 @@ rm -f %{name}-%{version}-filelist
|
|||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||||
> %{name}-%{version}-filelist
|
||||
|
||||
%files -f %{name}-%{version}-filelist
|
||||
%defattr(-,root,root)
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}-%{version}-filelist
|
||||
%defattr(-,root,root)
|
||||
|
||||
%postun
|
||||
|
||||
|
|
Loading…
Reference in New Issue