We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 546086f commit 61d7828Copy full SHA for 61d7828
packages/cubejs-api-gateway/src/sql-server.ts
@@ -301,7 +301,11 @@ export class SQLServer {
301
protected createDefaultCanSwitchSqlUserFn(options: SQLServerOptions): CanSwitchSQLUserFn {
302
const superUser = options.sqlSuperUser || getEnv('sqlSuperUser');
303
304
- return async (current: string | null, _user: string) => {
+ return async (current: string | null, newUser: string) => {
305
+ if (current === newUser) {
306
+ return true;
307
+ }
308
+
309
if (superUser) {
310
return current === superUser;
311
}
0 commit comments