feat(postgresql): add user and database authorization management (#14460)

* feat(postgresql): add user and database authorization management

* fix(postgresql): reuse existing roles during app recovery
This commit is contained in:
ssongliu
2026-11-18 09:53:22 +08:00
committed by GitHub
parent 6d8d3b25b1
commit 148e1981b0
46 changed files with 2113 additions and 366 deletions
+21
View File
@@ -297,6 +297,26 @@ export namespace Database {
type: string;
database: string;
}
export interface PostgresqlUser {
username: string;
password: string;
description: string;
superUser: boolean;
protected: boolean;
databases: string[];
}
export interface PostgresqlUserCreate {
database: string;
username: string;
password: string;
superUser: boolean;
description: string;
}
export interface PostgresqlUserGrant {
database: string;
name: string;
username: string;
}
export interface PostgresqlDBInfo {
id: number;
createdAt: Date;
@@ -316,6 +336,7 @@ export namespace Database {
file: string;
}
export interface PostgresqlDBCreate {
existingUser?: boolean;
name: string;
from: string;
database: string;