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 9327f70 commit 274488bCopy full SHA for 274488b
packages/cubejs-api-gateway/src/sql-server.ts
@@ -301,9 +301,9 @@ 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 (superUser) {
306
- return current === superUser;
+ return current === superUser || current === newUser;
307
}
308
309
return false;
0 commit comments