File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -2359,15 +2359,21 @@ def relations_user_databases_map(self) -> dict:
2359
2359
logger .warning (f"Failed to list access groups: { e } " )
2360
2360
return {USER : "all" , REPLICATION_USER : "all" , REWIND_USER : "all" }
2361
2361
user_database_map = {}
2362
- for user in self .postgresql .list_users_from_relation (
2363
- current_host = self .is_connectivity_enabled
2364
- ):
2365
- databases = "," .join (
2362
+ for user in self .postgresql .list_users (current_host = self .is_connectivity_enabled ):
2363
+ if user in (
2364
+ "backup" ,
2365
+ "monitoring" ,
2366
+ "operator" ,
2367
+ "postgres" ,
2368
+ "replication" ,
2369
+ "rewind" ,
2370
+ ):
2371
+ continue
2372
+ if databases := "," .join (
2366
2373
self .postgresql .list_accessible_databases_for_user (
2367
2374
user , current_host = self .is_connectivity_enabled
2368
2375
)
2369
- )
2370
- if databases :
2376
+ ):
2371
2377
user_database_map [user ] = databases
2372
2378
else :
2373
2379
logger .debug (f"User { user } has no databases to connect to" )
You can’t perform that action at this time.
0 commit comments