mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #2520 from bclermont/postgres_encrypted_password
fix ENCRYPTED usage on user creation
This commit is contained in:
commit
1a6dc1db5b
@ -315,14 +315,14 @@ def user_create(username,
|
||||
|
||||
sub_cmd = 'CREATE USER "{0}" WITH'.format(username, )
|
||||
if password:
|
||||
if encrypted:
|
||||
sub_cmd = "{0} ENCRYPTED".format(sub_cmd, )
|
||||
escaped_password = password.replace("'", "''")
|
||||
sub_cmd = "{0} PASSWORD '{1}'".format(sub_cmd, escaped_password)
|
||||
if createdb:
|
||||
sub_cmd = "{0} CREATEDB".format(sub_cmd, )
|
||||
if createuser:
|
||||
sub_cmd = "{0} CREATEUSER".format(sub_cmd, )
|
||||
if encrypted:
|
||||
sub_cmd = "{0} ENCRYPTED".format(sub_cmd, )
|
||||
if superuser:
|
||||
sub_cmd = "{0} SUPERUSER".format(sub_cmd, )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user