Add warning of removing user creation (#2893)

This commit is contained in:
GuanqunYang193
2023-10-17 13:04:59 +02:00
committed by GitHub
parent e513f7f127
commit 60d8bc3a70
+3
View File
@@ -400,6 +400,9 @@ BEGIN
END;$$""".format(f, quote_ident(rewind['username'], postgresql.connection()))
postgresql.query(sql)
if config.get('users'):
logger.warning('User creation via "bootstrap.users" will be removed in v4.0.0')
for name, value in (config.get('users') or {}).items():
if all(name != a.get('username') for a in (superuser, replication, rewind)):
self.create_or_update_role(name, value.get('password'), value.get('options', []))