Skip to content
Snippets Groups Projects
Commit d81a38a7 authored by Thom's avatar Thom :tools:
Browse files

Move Allowed SSH authentication from Main Config -> Misc to Main Config -> Sites (#5850)

parent 505be171
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ reseller_can_use_options=n
web_php_options=no,fast-cgi,mod,php-fpm
show_aps_menu=n
client_protection=y
ssh_authentication=ssh_authentication_password_key
[tools]
......@@ -71,4 +72,3 @@ session_timeout=0
session_allow_endless=0
min_password_length=8
min_password_strength=3
ssh_authentication=
......@@ -235,6 +235,12 @@ $form["tabs"]['sites'] = array (
'separator' => ',',
'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM')
),
'ssh_authentication' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'ssh_authentication_password_key',
'value' => array('' => 'ssh_authentication_password_key', 'password' => 'ssh_authentication_password', 'key' => 'ssh_authentication_key')
)
//#################################
// END Datatable fields
//#################################
......@@ -772,12 +778,6 @@ $form["tabs"]['misc'] = array (
'formtype' => 'SELECT',
'default' => '',
'value' => array('' => 'None', '1' => 'strength_1', '2' => 'strength_2', '3' => 'strength_3', '4' => 'strength_4', '5' => 'strength_5')
),
'ssh_authentication' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '',
'value' => array('' => 'ssh_authentication_password_key', 'password' => 'ssh_authentication_password', 'key' => 'ssh_authentication_key')
)
//#################################
// END Datatable fields
......
......@@ -123,13 +123,6 @@
</select>
</div>
</div>
<div class="form-group">
<label for="ssh_authentication" class="col-sm-3 control-label">{tmpl_var name='ssh_authentication_txt'}</label>
<div class="col-sm-9"><select name="ssh_authentication" id="ssh_authentication" class="form-control">
{tmpl_var name='ssh_authentication'}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='maintenance_mode_txt'}</label>
<div class="col-sm-9">
......
......@@ -90,6 +90,13 @@
<label for="default_remote_dbserver" class="col-sm-3 control-label">{tmpl_var name='default_remote_dbserver_txt'}</label>
<div class="col-sm-9"><input type="text" name="default_remote_dbserver" id="default_remote_dbserver" value="{tmpl_var name='default_remote_dbserver'}" class="form-control" /></div>
</div>
<div class="form-group">
<label for="ssh_authentication" class="col-sm-3 control-label">{tmpl_var name='ssh_authentication_txt'}</label>
<div class="col-sm-9"><select name="ssh_authentication" id="ssh_authentication" class="form-control">
{tmpl_var name='ssh_authentication'}
</select>
</div>
</div>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
......
......@@ -97,7 +97,7 @@ class page_action extends tform_actions {
$app->tpl->setVar("edit_disabled", 0);
}
$app->tpl->setVar('ssh_authentication', $system_config['misc']['ssh_authentication']);
$app->tpl->setVar('ssh_authentication', $system_config['sites']['ssh_authentication']);
parent::onShowEnd();
}
......@@ -151,7 +151,7 @@ class page_action extends tform_actions {
}
}
unset($blacklist);
if($app->functions->is_allowed_user(trim(strtolower($this->dataRecord['username']))) == false) $app->tform->errorMessage .= $app->tform->lng('username_not_allowed_txt');
/*
......@@ -181,7 +181,7 @@ class page_action extends tform_actions {
$dir = $web["document_root"];
$uid = $web["system_user"];
$gid = $web["system_group"];
// Check system user and group
if($app->functions->is_allowed_user($uid) == false || $app->functions->is_allowed_group($gid) == false) {
$app->error($app->tform->lng('invalid_system_user_or_group_txt'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment