This commit is contained in:
2025-11-13 06:29:24 +01:00
parent 66f207416d
commit 957709f79d
5 changed files with 15 additions and 1 deletions
@@ -35,6 +35,10 @@ export default async function handleMariadbUserGrants({
}: Params): Promise<Return> {
const { userDbPrefix } = grabDbNames({ user });
if (!userDbPrefix) {
throw new Error(`No userDbPrefix generated for grants handling!`);
}
/**
* # Revoke All Existing Grants
*/
@@ -28,6 +28,10 @@ export default async function createUserSQLUser(user: UserType) {
} = grabUserMainSqlUserName({ user });
const { userDbPrefix } = grabDbNames({ user });
if (!userDbPrefix) {
throw new Error(`No userDbPrefix generated for creating SQL user!`);
}
await dbHandler({
query: `DROP USER IF EXISTS '${mariaDBUsername}'@'${webHost}'`,
noErrorLogs: true,