feat: apply super settings on impersonated roles

If they have GRANT SET ON PARAMETER <setting> TO authenticator
This commit is contained in:
steve-chavez
2023-11-21 10:54:56 -05:00
committed by Steve Chavez
parent 125f10a60f
commit f7bf2157f3
7 changed files with 48 additions and 7 deletions
+2 -1
View File
@@ -376,6 +376,7 @@ establishConnection appState =
reReadConfig :: Bool -> AppState -> IO ()
reReadConfig startingUp appState = do
AppConfig{..} <- getConfig appState
pgVer <- getPgVersion appState
dbSettings <-
if configDbConfig then do
qDbSettings <- usePool appState $ queryDbSettings (dumpQi <$> configDbPreConfig) configDbPreparedStatements
@@ -396,7 +397,7 @@ reReadConfig startingUp appState = do
pure mempty
(roleSettings, roleIsolationLvl) <-
if configDbConfig then do
rSettings <- usePool appState $ queryRoleSettings configDbPreparedStatements
rSettings <- usePool appState $ queryRoleSettings pgVer configDbPreparedStatements
case rSettings of
Left e -> do
logWithZTime appState "An error ocurred when trying to query the role settings"