Merge pull request #2678 from neondatabase/stas/hotfix_schema

Hotfix to disable grant create on public schema
This commit is contained in:
Stas Kelvich
2022-10-22 02:54:31 +03:00
committed by GitHub

View File

@@ -423,11 +423,11 @@ pub fn handle_grants(node: &ComputeNode, client: &mut Client) -> Result<()> {
);
db_client.simple_query(&alter_query)?;
// Explicitly grant CREATE ON SCHEMA PUBLIC to the web_access user.
// This is needed since postgres 15, where this privilege is removed by default.
let grant_query: String = "GRANT CREATE ON SCHEMA public TO web_access".to_string();
info!("grant query for db {} : {}", &db.name, &grant_query);
db_client.simple_query(&grant_query)?;
// // Explicitly grant CREATE ON SCHEMA PUBLIC to the web_access user.
// // This is needed since postgres 15, where this privilege is removed by default.
// let grant_query: String = "GRANT CREATE ON SCHEMA public TO web_access".to_string();
// info!("grant query for db {} : {}", &db.name, &grant_query);
// db_client.simple_query(&grant_query)?;
}
Ok(())