Scope phpMyAdmin SSO to one database, fix logout, reset create form
After live testing on the real server, three follow-up issues surfaced: - PhpMyAdminSso granted the temporary SSO MySQL role access to every database the account owns, not just the one the "Zaloguj do bazy" button was clicked for, so phpMyAdmin showed all databases. Extract determineGrantTargets() and scope the GRANT to only the requested database; also set phpMyAdmin's only_db from the SSO session so the UI itself only shows that database. - phpMyAdmin's LogoutURL pointed at da_login.php with no ticket, which always produced "Missing or invalid phpMyAdmin login ticket." on logout. Add a DIRECTADMIN_PANEL_PORT setting (default 2222) and point LogoutURL at the plugin's own database list (/CMD_PLUGINS/alt-mysql/index.html) instead. - The create-database form kept echoing back the just-submitted values after a successful creation, forcing manual clearing before creating the next database. Clear the relevant $_POST keys once creation succeeds so the form resets while still preserving sticky values on validation failure. Bump version to 1.2.14 and rebuild the release archive.
This commit is contained in:
@@ -320,6 +320,19 @@ return static function (AppContext $ctx): void {
|
||||
$generatedRole = $selectedRole;
|
||||
$generatedDb = $dbName;
|
||||
$ok[] = 'Baza danych została utworzona.';
|
||||
|
||||
// Reset the create-database form so the next database can be
|
||||
// created without manually clearing the previous input.
|
||||
$_POST['db_suffix'] = '';
|
||||
$_POST['db_name'] = '';
|
||||
$_POST['role_name'] = '';
|
||||
$_POST['password'] = '';
|
||||
$_POST['existing_role'] = '';
|
||||
$_POST['role_mode'] = 'new';
|
||||
$_POST['creation_mode'] = 'simple';
|
||||
$_POST['remote_host'] = '';
|
||||
$_POST['remote_comment'] = '';
|
||||
$advancedPosted = false;
|
||||
} catch (Throwable $inner) {
|
||||
if ($createdDatabase) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user