Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7b6cbbffac | ||
|
7399d228c6 | ||
|
96457a300d | ||
|
6e9820bfd6 | ||
|
152c1d08f1 | ||
|
29f2690d33 | ||
|
6fc63e7980 | ||
|
82c7e91444 | ||
|
6c2188e568 |
|
@ -11,9 +11,7 @@ my $auth = (($limesurvey{'Authentication'} || 'http') eq 'http') ? "AuthName \"L
|
||||||
|
|
||||||
if ($limesurvey{'status'} eq 'enabled'){
|
if ($limesurvey{'status'} eq 'enabled'){
|
||||||
|
|
||||||
my $path = ($alias eq '') ? '' : 'limesurvey/';
|
$OUT .=<<"END";
|
||||||
|
|
||||||
$OUT .=<<"END"
|
|
||||||
|
|
||||||
# LimeSurvey Configuration
|
# LimeSurvey Configuration
|
||||||
$alias
|
$alias
|
||||||
|
@ -39,15 +37,24 @@ $alias
|
||||||
allow from $allow
|
allow from $allow
|
||||||
Satisfy all
|
Satisfy all
|
||||||
</Directory>
|
</Directory>
|
||||||
<LocationMatch "^/$path(index\.php/)?admin">
|
END
|
||||||
|
|
||||||
|
if ($alias ne ''){
|
||||||
|
$OUT .=<<"END";
|
||||||
|
<LocationMatch "^/limesurvey/(index\.php/)?admin">
|
||||||
SSLRequireSSL on
|
SSLRequireSSL on
|
||||||
$auth
|
$auth
|
||||||
</LocationMatch>
|
</LocationMatch>
|
||||||
|
END
|
||||||
|
|
||||||
|
}
|
||||||
|
$OUT .=<<'END';
|
||||||
<DirectoryMatch "/usr/share/limesurvey/(framework|console|installer/sql|locale|application/(logs|config)|docs)">
|
<DirectoryMatch "/usr/share/limesurvey/(framework|console|installer/sql|locale|application/(logs|config)|docs)">
|
||||||
Deny from all
|
Deny from all
|
||||||
</DirectoryMatch>
|
</DirectoryMatch>
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$OUT .= "# LimeSurvey is disabled\n";
|
$OUT .= "# LimeSurvey is disabled\n";
|
||||||
|
|
|
@ -5,32 +5,30 @@ $lang = substr $lang, 0, 2;
|
||||||
|
|
||||||
$OUT .=<<"EOF";
|
$OUT .=<<"EOF";
|
||||||
|
|
||||||
if (!function_exists('hook_get_auth_webserver_profile')){
|
function hook_get_auth_webserver_profile(\$user_name) {
|
||||||
function hook_get_auth_webserver_profile(\$user_name) {
|
if (!isset(\$_SERVER['REMOTE_USER'])){
|
||||||
if (!isset(\$_SERVER['REMOTE_USER'])){
|
return false;
|
||||||
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',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
\$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')){
|
if (!function_exists('hook_get_auth_webserver_permissions')){
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%define name smeserver-limesurvey
|
%define name smeserver-limesurvey
|
||||||
%define version 0.1.5
|
%define version 0.1.10
|
||||||
%define release 1
|
%define release 1
|
||||||
Summary: SME server integration of limesurvey
|
Summary: SME server integration of limesurvey
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -22,6 +22,22 @@ AutoReqProv: no
|
||||||
Integration of LimeSurvey on SME Server
|
Integration of LimeSurvey on SME Server
|
||||||
|
|
||||||
%changelog
|
%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
|
* Fri Jan 16 2015 Daniel Berteaud <daniel@firewall-services.com> 0.1.5-1.sme
|
||||||
- Fix the new permission hook
|
- Fix the new permission hook
|
||||||
|
|
||||||
|
@ -54,12 +70,11 @@ rm -f %{name}-%{version}-filelist
|
||||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||||||
> %{name}-%{version}-filelist
|
> %{name}-%{version}-filelist
|
||||||
|
|
||||||
%files -f %{name}-%{version}-filelist
|
|
||||||
%defattr(-,root,root)
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files -f %{name}-%{version}-filelist
|
||||||
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user