added abbility to enable/disable login for ftp users; fixes #1146

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-07-24 15:23:15 +02:00
parent 8d66a4aec4
commit 6d42968d1a
6 changed files with 54 additions and 6 deletions

View File

@@ -25,6 +25,8 @@
use Froxlor\Settings;
use Froxlor\UI\Callbacks\Ftp;
use Froxlor\UI\Callbacks\Style;
use Froxlor\UI\Callbacks\Text;
use Froxlor\UI\Listing;
return [
@@ -51,13 +53,19 @@ return [
'label' => lng('panel.shell'),
'field' => 'shell',
'visible' => Settings::Get('system.allow_customer_shell') == '1'
],
'login_enabled' => [
'label' => lng('panel.active'),
'field' => 'login_enabled',
'callback' => [Text::class, 'yesno'],
]
],
'visible_columns' => Listing::getVisibleColumnsForListing('ftp_list', [
'username',
'description',
'homedir',
'shell'
'shell',
'login_enabled',
]),
'actions' => [
'edit' => [
@@ -81,6 +89,9 @@ return [
'id' => ':id'
],
]
]
],
'format_callback' => [
[Style::class, 'loginDisabled']
],
]
];