Skip to content

Commit

Permalink
Avoid conflicting options.
Browse files Browse the repository at this point in the history
If you're a superuser, you already have permissions to create a user. Postgres will complain about conflicting options if you attempt to pass both. Refs #8717.
  • Loading branch information
Mike Place authored and basepi committed Dec 6, 2013
1 parent 652ee5b commit eb20421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/modules/postgres.py
Expand Up @@ -529,7 +529,7 @@ def _role_create(name,
sub_cmd = '{0} PASSWORD {1!r}'.format(sub_cmd, escaped_password)
if createdb:
sub_cmd = '{0} CREATEDB'.format(sub_cmd)
if createuser:
if createuser and not superuser:
sub_cmd = '{0} CREATEUSER'.format(sub_cmd)
if superuser:
sub_cmd = '{0} SUPERUSER'.format(sub_cmd)
Expand Down

0 comments on commit eb20421

Please sign in to comment.