implement 'master database user for customers'; fixes #1227

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2024-02-11 10:26:22 +01:00
parent 686ca84a30
commit 8132976559
10 changed files with 226 additions and 17 deletions

View File

@@ -0,0 +1,53 @@
<?php
use Froxlor\Settings;
use Froxlor\System\Crypt;
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at https://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 https://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return [
'mysql_global_user' => [
'title' => lng('mysql.edit_global_user'),
'self_overview' => ['section' => 'mysql', 'page' => 'mysqls'],
'sections' => [
'section_a' => [
'title' => lng('mysql.edit_global_user'),
'fields' => [
'username' => [
'label' => lng('login.username'),
'value' => $userinfo['loginname'],
'type' => 'text',
'readonly' => true
],
'mysql_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off',
'mandatory' => true,
'next_to' => [
'mysql_password_suggestion' => [
'next_to_prefix' => lng('customer.generated_pwd') . ':',
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword(),
'readonly' => true
]
]
]
]
]
]
]
];