Commit 67b0cb39 authored by Marius Burkard's avatar Marius Burkard
Browse files

Closes #3754 and #3755

- added limit for letsencrypt and directive snippets selector to client limits
- hide ssl tab if letsencrypt is selected
parent 3a5909cd
...@@ -204,12 +204,13 @@ CREATE TABLE `ftp_traffic` ( ...@@ -204,12 +204,13 @@ CREATE TABLE `ftp_traffic` (
ALTER TABLE `mail_forwarding` ADD COLUMN `allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `active`; ALTER TABLE `mail_forwarding` ADD COLUMN `allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `active`;
UPDATE `mail_forwarding` SET `allow_send_as` = 'y' WHERE `type` = 'alias'; UPDATE `mail_forwarding` SET `allow_send_as` = 'y' WHERE `type` = 'alias';
--- DNSSEC-Implementation by dark alex
--- TODO: Review and resolve conflicts if more has been done in that column
ALTER TABLE `dns_rr` CHANGE COLUMN `type` `type` ENUM('A','AAAA','ALIAS','CNAME','DS','HINFO','LOC','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') NULL DEFAULT NULL AFTER `name`; ALTER TABLE `dns_rr` CHANGE COLUMN `type` `type` ENUM('A','AAAA','ALIAS','CNAME','DS','HINFO','LOC','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') NULL DEFAULT NULL AFTER `name`;
ALTER TABLE `dns_soa` ALTER TABLE `dns_soa`
ADD COLUMN `dnssec_initialized` ENUM('Y','N') NOT NULL DEFAULT 'N', ADD COLUMN `dnssec_initialized` ENUM('Y','N') NOT NULL DEFAULT 'N',
ADD COLUMN `dnssec_wanted` ENUM('Y','N') NOT NULL DEFAULT 'N', ADD COLUMN `dnssec_wanted` ENUM('Y','N') NOT NULL DEFAULT 'N',
ADD COLUMN `dnssec_last_signed` BIGINT NOT NULL DEFAULT '0', ADD COLUMN `dnssec_last_signed` BIGINT NOT NULL DEFAULT '0',
ADD COLUMN `dnssec_info` TEXT NULL; ADD COLUMN `dnssec_info` TEXT NULL;
\ No newline at end of file
ALTER TABLE `client` ADD COLUMN `limit_ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `limit_ssl`;
ALTER TABLE `client_template` ADD COLUMN `limit_ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `limit_ssl`;
...@@ -211,6 +211,7 @@ CREATE TABLE `client` ( ...@@ -211,6 +211,7 @@ CREATE TABLE `client` (
`limit_hterror` enum('n','y') NOT NULL DEFAULT 'n', `limit_hterror` enum('n','y') NOT NULL DEFAULT 'n',
`limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n', `limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n',
`limit_ssl` enum('n','y') NOT NULL DEFAULT 'n', `limit_ssl` enum('n','y') NOT NULL DEFAULT 'n',
`limit_ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n',
`limit_web_subdomain` int(11) NOT NULL DEFAULT '-1', `limit_web_subdomain` int(11) NOT NULL DEFAULT '-1',
`limit_web_aliasdomain` int(11) NOT NULL DEFAULT '-1', `limit_web_aliasdomain` int(11) NOT NULL DEFAULT '-1',
`limit_ftp_user` int(11) NOT NULL DEFAULT '-1', `limit_ftp_user` int(11) NOT NULL DEFAULT '-1',
...@@ -335,6 +336,7 @@ CREATE TABLE `client_template` ( ...@@ -335,6 +336,7 @@ CREATE TABLE `client_template` (
`limit_hterror` enum('n','y') NOT NULL DEFAULT 'n', `limit_hterror` enum('n','y') NOT NULL DEFAULT 'n',
`limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n', `limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n',
`limit_ssl` enum('n','y') NOT NULL DEFAULT 'n', `limit_ssl` enum('n','y') NOT NULL DEFAULT 'n',
`limit_ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n',
`limit_web_subdomain` int(11) NOT NULL default '-1', `limit_web_subdomain` int(11) NOT NULL default '-1',
`limit_web_aliasdomain` int(11) NOT NULL default '-1', `limit_web_aliasdomain` int(11) NOT NULL default '-1',
`limit_ftp_user` int(11) NOT NULL default '-1', `limit_ftp_user` int(11) NOT NULL default '-1',
......
...@@ -1022,6 +1022,12 @@ $form["tabs"]['limits'] = array ( ...@@ -1022,6 +1022,12 @@ $form["tabs"]['limits'] = array (
'default' => 'n', 'default' => 'n',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
), ),
'limit_ssl_letsencrypt' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'limit_web_aliasdomain' => array ( 'limit_web_aliasdomain' => array (
'datatype' => 'INTEGER', 'datatype' => 'INTEGER',
'formtype' => 'TEXT', 'formtype' => 'TEXT',
...@@ -1109,6 +1115,12 @@ $form["tabs"]['limits'] = array ( ...@@ -1109,6 +1115,12 @@ $form["tabs"]['limits'] = array (
'default' => 'y', 'default' => 'y',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
), ),
'limit_directive_snippets' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'default_dnsserver' => array ( 'default_dnsserver' => array (
'datatype' => 'INTEGER', 'datatype' => 'INTEGER',
'formtype' => 'SELECT', 'formtype' => 'SELECT',
......
...@@ -522,6 +522,12 @@ $form["tabs"]['limits'] = array ( ...@@ -522,6 +522,12 @@ $form["tabs"]['limits'] = array (
'default' => 'n', 'default' => 'n',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
), ),
'limit_ssl_letsencrypt' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'limit_web_aliasdomain' => array ( 'limit_web_aliasdomain' => array (
'datatype' => 'INTEGER', 'datatype' => 'INTEGER',
'formtype' => 'TEXT', 'formtype' => 'TEXT',
...@@ -612,6 +618,12 @@ $form["tabs"]['limits'] = array ( ...@@ -612,6 +618,12 @@ $form["tabs"]['limits'] = array (
'default' => 'y', 'default' => 'y',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
), ),
'limit_directive_snippets' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'default_dnsserver' => array ( 'default_dnsserver' => array (
'datatype' => 'INTEGER', 'datatype' => 'INTEGER',
'formtype' => 'SELECT', 'formtype' => 'SELECT',
......
...@@ -1019,6 +1019,12 @@ $form["tabs"]['limits'] = array ( ...@@ -1019,6 +1019,12 @@ $form["tabs"]['limits'] = array (
'default' => 'n', 'default' => 'n',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
), ),
'limit_ssl_letsencrypt' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'limit_web_aliasdomain' => array ( 'limit_web_aliasdomain' => array (
'datatype' => 'INTEGER', 'datatype' => 'INTEGER',
'formtype' => 'TEXT', 'formtype' => 'TEXT',
...@@ -1105,6 +1111,12 @@ $form["tabs"]['limits'] = array ( ...@@ -1105,6 +1111,12 @@ $form["tabs"]['limits'] = array (
'default' => 'y', 'default' => 'y',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
), ),
'limit_directive_snippets' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'default_dnsserver' => array ( 'default_dnsserver' => array (
'datatype' => 'INTEGER', 'datatype' => 'INTEGER',
'formtype' => 'SELECT', 'formtype' => 'SELECT',
......
...@@ -98,6 +98,7 @@ $wb['force_suexec_txt'] = 'SuEXEC erzwungen'; ...@@ -98,6 +98,7 @@ $wb['force_suexec_txt'] = 'SuEXEC erzwungen';
$wb['limit_hterror_txt'] = 'Eigene Fehlerseiten verfügbar'; $wb['limit_hterror_txt'] = 'Eigene Fehlerseiten verfügbar';
$wb['limit_wildcard_txt'] = 'Wildcard Subdomain verfügbar'; $wb['limit_wildcard_txt'] = 'Wildcard Subdomain verfügbar';
$wb['limit_ssl_txt'] = 'SSL verfügbar'; $wb['limit_ssl_txt'] = 'SSL verfügbar';
$wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt verfügbar';
$wb['limit_client_error'] = 'Die maximale Anzahl an Kunden wurde erreicht.'; $wb['limit_client_error'] = 'Die maximale Anzahl an Kunden wurde erreicht.';
$wb['limit_mailaliasdomain_txt'] = 'Max. Anzahl an Domain Aliases'; $wb['limit_mailaliasdomain_txt'] = 'Max. Anzahl an Domain Aliases';
$wb['limit_mailaliasdomain_error_notint'] = 'Das E-Mail Domain Alias Limit muss eine Zahl sein.'; $wb['limit_mailaliasdomain_error_notint'] = 'Das E-Mail Domain Alias Limit muss eine Zahl sein.';
...@@ -194,4 +195,5 @@ $wb['limit_xmpp_anon_txt'] = 'Anonymous host available'; ...@@ -194,4 +195,5 @@ $wb['limit_xmpp_anon_txt'] = 'Anonymous host available';
$wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available'; $wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['limit_directive_snippets_txt'] = 'Webserver-Konfigurationsauswahl sichtbar';
?> ?>
...@@ -77,6 +77,7 @@ $wb['force_suexec_txt'] = 'SuEXEC erzwungen'; ...@@ -77,6 +77,7 @@ $wb['force_suexec_txt'] = 'SuEXEC erzwungen';
$wb['limit_hterror_txt'] = 'Eigene Fehlerseiten verfügbar'; $wb['limit_hterror_txt'] = 'Eigene Fehlerseiten verfügbar';
$wb['limit_wildcard_txt'] = 'Wildcard Subdomain verfügbar'; $wb['limit_wildcard_txt'] = 'Wildcard Subdomain verfügbar';
$wb['limit_ssl_txt'] = 'SSL verfügbar'; $wb['limit_ssl_txt'] = 'SSL verfügbar';
$wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt verfügbar';
$wb['template_type_txt'] = 'Vorlagen Typ'; $wb['template_type_txt'] = 'Vorlagen Typ';
$wb['template_name_txt'] = 'Vorlagen Name'; $wb['template_name_txt'] = 'Vorlagen Name';
$wb['web_limits_txt'] = 'Web Limits'; $wb['web_limits_txt'] = 'Web Limits';
...@@ -114,4 +115,5 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; ...@@ -114,4 +115,5 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available'; $wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['dns_servers_txt'] = 'DNS servers'; $wb['dns_servers_txt'] = 'DNS servers';
$wb['limit_directive_snippets_txt'] = 'Webserver-Konfigurationsauswahl sichtbar';
?> ?>
...@@ -97,6 +97,7 @@ $wb['force_suexec_txt'] = 'SuEXEC erzwungen'; ...@@ -97,6 +97,7 @@ $wb['force_suexec_txt'] = 'SuEXEC erzwungen';
$wb['limit_hterror_txt'] = 'Eigene Fehlerseiten verfügbar'; $wb['limit_hterror_txt'] = 'Eigene Fehlerseiten verfügbar';
$wb['limit_wildcard_txt'] = 'Wildcard Subdomain verfügbar'; $wb['limit_wildcard_txt'] = 'Wildcard Subdomain verfügbar';
$wb['limit_ssl_txt'] = 'SSL verfügbar'; $wb['limit_ssl_txt'] = 'SSL verfügbar';
$wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt verfügbar';
$wb['limit_client_error'] = 'Die maximale Anzahl an Kunden wurde erreicht.'; $wb['limit_client_error'] = 'Die maximale Anzahl an Kunden wurde erreicht.';
$wb['limit_client_error_positive_or_unlimited'] = 'Die Anzahl an Kunden muss > 0 sein'; $wb['limit_client_error_positive_or_unlimited'] = 'Die Anzahl an Kunden muss > 0 sein';
$wb['limit_web_quota_txt'] = 'Speicherplatzbeschränkung'; $wb['limit_web_quota_txt'] = 'Speicherplatzbeschränkung';
...@@ -196,4 +197,5 @@ $wb['limit_xmpp_anon_txt'] = 'Anonymous host available'; ...@@ -196,4 +197,5 @@ $wb['limit_xmpp_anon_txt'] = 'Anonymous host available';
$wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available'; $wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['limit_directive_snippets_txt'] = 'Webserver-Konfigurationsauswahl sichtbar';
?> ?>
...@@ -110,6 +110,7 @@ $wb["force_suexec_txt"] = "SuEXEC forced"; ...@@ -110,6 +110,7 @@ $wb["force_suexec_txt"] = "SuEXEC forced";
$wb["limit_hterror_txt"] = "Custom error docs available"; $wb["limit_hterror_txt"] = "Custom error docs available";
$wb["limit_wildcard_txt"] = "Wildcard subdomain available"; $wb["limit_wildcard_txt"] = "Wildcard subdomain available";
$wb["limit_ssl_txt"] = "SSL available"; $wb["limit_ssl_txt"] = "SSL available";
$wb["limit_ssl_letsencrypt_txt"] = "Let\'s Encrypt available";
$wb["limit_client_error"] = 'The max. number of clients is reached.'; $wb["limit_client_error"] = 'The max. number of clients is reached.';
$wb["limit_web_quota_txt"] = 'Web Quota'; $wb["limit_web_quota_txt"] = 'Web Quota';
$wb["limit_traffic_quota_txt"] = 'Traffic Quota'; $wb["limit_traffic_quota_txt"] = 'Traffic Quota';
...@@ -200,4 +201,5 @@ $wb['btn_save_txt'] = "Save"; ...@@ -200,4 +201,5 @@ $wb['btn_save_txt'] = "Save";
$wb['btn_cancel_txt'] = "Cancel"; $wb['btn_cancel_txt'] = "Cancel";
$wb['invalid_vat_id'] = 'The VAT ID is invalid.'; $wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb["email_error_empty"] = "Email is empty"; $wb["email_error_empty"] = "Email is empty";
$wb['limit_directive_snippets_txt'] = 'Show web server config selection';
?> ?>
...@@ -85,6 +85,7 @@ $wb["force_suexec_txt"] = "SuEXEC forced"; ...@@ -85,6 +85,7 @@ $wb["force_suexec_txt"] = "SuEXEC forced";
$wb["limit_hterror_txt"] = "Custom error docs available"; $wb["limit_hterror_txt"] = "Custom error docs available";
$wb["limit_wildcard_txt"] = "Wildcard subdomain available"; $wb["limit_wildcard_txt"] = "Wildcard subdomain available";
$wb["limit_ssl_txt"] = "SSL available"; $wb["limit_ssl_txt"] = "SSL available";
$wb["limit_ssl_letsencrypt_txt"] = "Let\'s Encrypt available";
$wb["web_limits_txt"] = 'Web Limits'; $wb["web_limits_txt"] = 'Web Limits';
$wb["email_limits_txt"] = 'Email Limits'; $wb["email_limits_txt"] = 'Email Limits';
$wb["database_limits_txt"] = 'Database Limits'; $wb["database_limits_txt"] = 'Database Limits';
...@@ -116,4 +117,5 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; ...@@ -116,4 +117,5 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available'; $wb['limit_xmpp_status_txt'] = 'Status host available';
$wb["dns_servers_txt"] = 'DNS servers'; $wb["dns_servers_txt"] = 'DNS servers';
$wb['limit_directive_snippets_txt'] = 'Show web server config selection';
?> ?>
...@@ -108,6 +108,7 @@ $wb["force_suexec_txt"] = "SuEXEC forced"; ...@@ -108,6 +108,7 @@ $wb["force_suexec_txt"] = "SuEXEC forced";
$wb["limit_hterror_txt"] = "Custom error docs available"; $wb["limit_hterror_txt"] = "Custom error docs available";
$wb["limit_wildcard_txt"] = "Wildcard subdomain available"; $wb["limit_wildcard_txt"] = "Wildcard subdomain available";
$wb["limit_ssl_txt"] = "SSL available"; $wb["limit_ssl_txt"] = "SSL available";
$wb["limit_ssl_letsencrypt_txt"] = "Let\'s Encrypt available";
$wb["limit_client_error"] = 'The max. number of clients is reached.'; $wb["limit_client_error"] = 'The max. number of clients is reached.';
$wb["limit_client_error_positive_or_unlimited"] = 'The number of clients must be > 0 or -1 (unlimited)'; $wb["limit_client_error_positive_or_unlimited"] = 'The number of clients must be > 0 or -1 (unlimited)';
$wb["limit_web_quota_txt"] = 'Web Quota'; $wb["limit_web_quota_txt"] = 'Web Quota';
...@@ -200,4 +201,6 @@ $wb['invalid_vat_id'] = 'The VAT ID is invalid.'; ...@@ -200,4 +201,6 @@ $wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb["btn_save_txt"] = "Save"; $wb["btn_save_txt"] = "Save";
$wb["btn_cancel_txt"] = "Cancel"; $wb["btn_cancel_txt"] = "Cancel";
$wb["email_error_empty"] = "Email is empty"; $wb["email_error_empty"] = "Email is empty";
$wb['limit_directive_snippets_txt'] = 'Show web server config selection';
?> ?>
...@@ -136,6 +136,12 @@ ...@@ -136,6 +136,12 @@
{tmpl_var name='limit_ssl'} {tmpl_var name='limit_ssl'}
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_letsencrypt_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='limit_ssl_letsencrypt'}
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="limit_web_aliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_aliasdomain_txt'}</label> <label for="limit_web_aliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" class="form-control" /></div></div> <div class="col-sm-9"><input type="text" name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" class="form-control" /></div></div>
...@@ -163,6 +169,12 @@ ...@@ -163,6 +169,12 @@
{tmpl_var name='limit_backup'} {tmpl_var name='limit_backup'}
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='limit_directive_snippets_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='limit_directive_snippets'}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -88,6 +88,12 @@ ...@@ -88,6 +88,12 @@
{tmpl_var name='limit_ssl'} {tmpl_var name='limit_ssl'}
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_letsencrypt_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='limit_ssl_letsencrypt'}
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="limit_web_aliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_aliasdomain_txt'}</label> <label for="limit_web_aliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" class="form-control" /></div></div> <div class="col-sm-9"><input type="text" name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" class="form-control" /></div></div>
...@@ -115,6 +121,12 @@ ...@@ -115,6 +121,12 @@
{tmpl_var name='limit_backup'} {tmpl_var name='limit_backup'}
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='limit_directive_snippets_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='limit_directive_snippets'}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -139,6 +139,12 @@ ...@@ -139,6 +139,12 @@
{tmpl_var name='limit_ssl'} {tmpl_var name='limit_ssl'}
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_letsencrypt_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='limit_ssl_letsencrypt'}
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="limit_web_aliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_aliasdomain_txt'}</label> <label for="limit_web_aliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" class="form-control" /></div></div> <div class="col-sm-9"><input type="text" name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" class="form-control" /></div></div>
...@@ -166,6 +172,12 @@ ...@@ -166,6 +172,12 @@
{tmpl_var name='limit_backup'} {tmpl_var name='limit_backup'}
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='limit_directive_snippets_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='limit_directive_snippets'}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -88,10 +88,11 @@ $ssl_available = true; ...@@ -88,10 +88,11 @@ $ssl_available = true;
$backup_available = ($vhostdomain_type == 'domain'); $backup_available = ($vhostdomain_type == 'domain');
if(!$app->auth->is_admin()) { if(!$app->auth->is_admin()) {
$client_group_id = $_SESSION["s"]["user"]["default_group"]; $client_group_id = $_SESSION["s"]["user"]["default_group"];
$client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl, limit_backup FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); $client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl, limit_ssl_letsencrypt, limit_backup FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
if($client['limit_wildcard'] != 'y') $wildcard_available = false; if($client['limit_wildcard'] != 'y') $wildcard_available = false;
if($client['limit_ssl'] != 'y') $ssl_available = false; if($client['limit_ssl'] != 'y') $ssl_available = false;
if($client['limit_ssl_letsencrypt'] == 'y') $ssl_available = false;
if($client['limit_backup'] != 'y') $backup_available = false; if($client['limit_backup'] != 'y') $backup_available = false;
} }
......
...@@ -142,4 +142,5 @@ $wb['server_chosen_not_ok'] = 'The selected server is not allowed for this accou ...@@ -142,4 +142,5 @@ $wb['server_chosen_not_ok'] = 'The selected server is not allowed for this accou
$wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; $wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.';
$wb['rewrite_to_https_txt'] = 'Rewrite HTTP to HTTPS'; $wb['rewrite_to_https_txt'] = 'Rewrite HTTP to HTTPS';
$wb['password_strength_txt'] = 'Password strength'; $wb['password_strength_txt'] = 'Password strength';
$wb['directive_snippets_id_txt'] = 'Webserver-Konfiguration';
?> ?>
...@@ -147,4 +147,5 @@ $wb["document_root_txt"] = "Document Root"; ...@@ -147,4 +147,5 @@ $wb["document_root_txt"] = "Document Root";
$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL'; $wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL';
$wb['rewrite_to_https_txt'] = 'Rewrite HTTP to HTTPS'; $wb['rewrite_to_https_txt'] = 'Rewrite HTTP to HTTPS';
$wb['password_strength_txt'] = 'Password strength'; $wb['password_strength_txt'] = 'Password strength';
$wb['directive_snippets_id_txt'] = 'Web server config';
?> ?>
...@@ -210,12 +210,14 @@ ...@@ -210,12 +210,14 @@
{tmpl_var name='ssl'} {tmpl_var name='ssl'}
</div> </div>
</div> </div>
<tmpl_if name="limit_ssl_letsencrypt" op="==" value="y">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='ssl_letsencrypt_txt'}</label> <label class="col-sm-3 control-label">{tmpl_var name='ssl_letsencrypt_txt'}</label>
<div class="col-sm-9"> <div class="col-sm-9">
{tmpl_var name='ssl_letsencrypt'} {tmpl_var name='ssl_letsencrypt'}
</div> </div>
</div></tmpl_if> </div></tmpl_if>
</tmpl_if>
<div class="form-group"> <div class="form-group">
<label for="php" class="col-sm-3 control-label">{tmpl_var name='php_txt'}</label> <label for="php" class="col-sm-3 control-label">{tmpl_var name='php_txt'}</label>
<div class="col-sm-9"><select name="php" id="php" class="form-control"> <div class="col-sm-9"><select name="php" id="php" class="form-control">
...@@ -229,12 +231,12 @@ ...@@ -229,12 +231,12 @@
{tmpl_var name='fastcgi_php_version'} {tmpl_var name='fastcgi_php_version'}
</select></div> </select></div>
</div> </div>
<div class="form-group"> <tmpl_if name="limit_directive_snippets" op="==" value="y"><div class="form-group">
<label for="directive_snippets_id" class="col-sm-3 control-label">{tmpl_var name='directive_snippets_id_txt'}</label> <label for="directive_snippets_id" class="col-sm-3 control-label">{tmpl_var name='directive_snippets_id_txt'}</label>
<div class="col-sm-9"><select name="directive_snippets_id" id="directive_snippets_id" class="form-control"> <div class="col-sm-9"><select name="directive_snippets_id" id="directive_snippets_id" class="form-control">
{tmpl_var name='directive_snippets_id'} {tmpl_var name='directive_snippets_id'}
</select></div> </select></div>
</div> </div></tmpl_if>
{tmpl_hook name="field_enable_pagespeed"} {tmpl_hook name="field_enable_pagespeed"}
<div class="form-group nginx pagespeed"> <div class="form-group nginx pagespeed">
<label class="col-sm-3 control-label">{tmpl_var name='enable_pagespeed_txt'}</label> <label class="col-sm-3 control-label">{tmpl_var name='enable_pagespeed_txt'}</label>
......
...@@ -139,7 +139,7 @@ class page_action extends tform_actions { ...@@ -139,7 +139,7 @@ class page_action extends tform_actions {
$app->uses('ini_parser,getconf'); $app->uses('ini_parser,getconf');
$settings = $app->getconf->get_global_config('domains'); $settings = $app->getconf->get_global_config('domains');
$read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl'); $read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl', 'limit_ssl_letsencrypt', 'limit_directive_snippets');
if($this->_vhostdomain_type != 'domain') $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ?", @$this->dataRecord["parent_domain_id"]); if($this->_vhostdomain_type != 'domain') $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ?", @$this->dataRecord["parent_domain_id"]);
...@@ -953,7 +953,7 @@ class page_action extends tform_actions { ...@@ -953,7 +953,7 @@ class page_action extends tform_actions {
$this->parent_domain_record = $parent_domain; $this->parent_domain_record = $parent_domain;
} }
$read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl'); $read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl', 'limit_ssl_letsencrypt', 'limit_directive_snippets');
/* check if the domain module is used - and check if the selected domain can be used! */ /* check if the domain module is used - and check if the selected domain can be used! */
if($app->tform->getCurrentTab() == 'domain') { if($app->tform->getCurrentTab() == 'domain') {
...@@ -1020,6 +1020,8 @@ class page_action extends tform_actions { ...@@ -1020,6 +1020,8 @@ class page_action extends tform_actions {
if($client['limit_hterror'] != 'y') $this->dataRecord['errordocs'] = 'n'; if($client['limit_hterror'] != 'y') $this->dataRecord['errordocs'] = 'n';
if($client['limit_wildcard'] != 'y' && $this->dataRecord['subdomain'] == '*') $this->dataRecord['subdomain'] = 'n'; if($client['limit_wildcard'] != 'y' && $this->dataRecord['subdomain'] == '*') $this->dataRecord['subdomain'] = 'n';
if($client['limit_ssl'] != 'y') $this->dataRecord['ssl'] = 'n'; if($client['limit_ssl'] != 'y') $this->dataRecord['ssl'] = 'n';
if($client['limit_ssl_letsencrypt'] != 'y') $this->dataRecord['ssl_letsencrypt'] = 'n';
if($client['limit_directive_snippets'] != 'y') $this->dataRecord['directive_snippets_id'] = 0
// only generate quota and traffic warnings if value has changed // only generate quota and traffic warnings if value has changed
if($this->id > 0) { if($this->id > 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment