Skip to content

Commit d81a38a

Browse files
author
thom
committed
Move Allowed SSH authentication from Main Config -> Misc to Main Config -> Sites (#5850)
1 parent 505be17 commit d81a38a

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

install/tpl/system.ini.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ reseller_can_use_options=n
3636
web_php_options=no,fast-cgi,mod,php-fpm
3737
show_aps_menu=n
3838
client_protection=y
39+
ssh_authentication=ssh_authentication_password_key
3940

4041

4142
[tools]
@@ -71,4 +72,3 @@ session_timeout=0
7172
session_allow_endless=0
7273
min_password_length=8
7374
min_password_strength=3
74-
ssh_authentication=

interface/web/admin/form/system_config.tform.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@
235235
'separator' => ',',
236236
'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM')
237237
),
238+
'ssh_authentication' => array(
239+
'datatype' => 'VARCHAR',
240+
'formtype' => 'SELECT',
241+
'default' => 'ssh_authentication_password_key',
242+
'value' => array('' => 'ssh_authentication_password_key', 'password' => 'ssh_authentication_password', 'key' => 'ssh_authentication_key')
243+
)
238244
//#################################
239245
// END Datatable fields
240246
//#################################
@@ -772,12 +778,6 @@
772778
'formtype' => 'SELECT',
773779
'default' => '',
774780
'value' => array('' => 'None', '1' => 'strength_1', '2' => 'strength_2', '3' => 'strength_3', '4' => 'strength_4', '5' => 'strength_5')
775-
),
776-
'ssh_authentication' => array(
777-
'datatype' => 'VARCHAR',
778-
'formtype' => 'SELECT',
779-
'default' => '',
780-
'value' => array('' => 'ssh_authentication_password_key', 'password' => 'ssh_authentication_password', 'key' => 'ssh_authentication_key')
781781
)
782782
//#################################
783783
// END Datatable fields

interface/web/admin/templates/system_config_misc_edit.htm

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@
123123
</select>
124124
</div>
125125
</div>
126-
<div class="form-group">
127-
<label for="ssh_authentication" class="col-sm-3 control-label">{tmpl_var name='ssh_authentication_txt'}</label>
128-
<div class="col-sm-9"><select name="ssh_authentication" id="ssh_authentication" class="form-control">
129-
{tmpl_var name='ssh_authentication'}
130-
</select>
131-
</div>
132-
</div>
133126
<div class="form-group">
134127
<label class="col-sm-3 control-label">{tmpl_var name='maintenance_mode_txt'}</label>
135128
<div class="col-sm-9">

interface/web/admin/templates/system_config_sites_edit.htm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@
9090
<label for="default_remote_dbserver" class="col-sm-3 control-label">{tmpl_var name='default_remote_dbserver_txt'}</label>
9191
<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>
9292
</div>
93+
<div class="form-group">
94+
<label for="ssh_authentication" class="col-sm-3 control-label">{tmpl_var name='ssh_authentication_txt'}</label>
95+
<div class="col-sm-9"><select name="ssh_authentication" id="ssh_authentication" class="form-control">
96+
{tmpl_var name='ssh_authentication'}
97+
</select>
98+
</div>
99+
</div>
93100

94101

95102
<input type="hidden" name="id" value="{tmpl_var name='id'}">

interface/web/sites/shell_user_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function onShowEnd() {
9797
$app->tpl->setVar("edit_disabled", 0);
9898
}
9999

100-
$app->tpl->setVar('ssh_authentication', $system_config['misc']['ssh_authentication']);
100+
$app->tpl->setVar('ssh_authentication', $system_config['sites']['ssh_authentication']);
101101

102102
parent::onShowEnd();
103103
}
@@ -151,7 +151,7 @@ function onBeforeInsert() {
151151
}
152152
}
153153
unset($blacklist);
154-
154+
155155
if($app->functions->is_allowed_user(trim(strtolower($this->dataRecord['username']))) == false) $app->tform->errorMessage .= $app->tform->lng('username_not_allowed_txt');
156156

157157
/*
@@ -181,7 +181,7 @@ function onAfterInsert() {
181181
$dir = $web["document_root"];
182182
$uid = $web["system_user"];
183183
$gid = $web["system_group"];
184-
184+
185185
// Check system user and group
186186
if($app->functions->is_allowed_user($uid) == false || $app->functions->is_allowed_group($gid) == false) {
187187
$app->error($app->tform->lng('invalid_system_user_or_group_txt'));

0 commit comments

Comments
 (0)