fix(doris): fall back to current user grants

This commit is contained in:
t8y2 committed 2026-07-24 14:11:18 +08:00
1 parent 7a0dbf3fb7
commit 959943315f
4 files changed
+41

No files matched your search

@@ -59,6 +59,8 @@ describe("database user admin providers", () => {
const provider = getDatabaseUserAdminProvider("doris");
expect(provider?.listUsersSql()).toBe("SHOW ALL GRANTS;");
expect(provider?.fallbackListUsersSql?.()).toBe("SHOW GRANTS;");
expect(provider?.parseFallbackUsers).toBe(dorisUsersResult);
expect(provider?.showGrantsSql({ user: "reporter", host: "%" })).toBe("SHOW GRANTS FOR 'reporter'@'%';");
expect(provider?.alterPasswordSql?.({ user: "reporter", host: "%" }, "new'secret")).toBe("SET PASSWORD FOR 'reporter'@'%' = PASSWORD('new''secret');");
expect(dorisPrivilegeTargetSql("analytics", "daily`rollup")).toBe("`internal`.`analytics`.`daily``rollup`");