summaryrefslogtreecommitdiff
path: root/database/postgresql/postgresql_user.py
diff options
context:
space:
mode:
authorWill Thames <will@thames.id.au>2015-07-22 13:34:52 +1000
committerWill Thames <will@thames.id.au>2015-07-22 13:34:52 +1000
commit47cb92f74f17c31c72a535e3ae153c328f85be53 (patch)
tree21aead0ee76c7fc582e1e4b03d73eac2db39ce46 /database/postgresql/postgresql_user.py
parent2a0f6c1cb33cf2cab5303ca1f26852011c7e2a80 (diff)
downloadansible-modules-core-47cb92f74f17c31c72a535e3ae153c328f85be53.tar.gz
Ensure TEMP privilege gets removed when expanding ALL.
ALL gets expanded to the list of VALID_PRIVS which includes TEMPORARY and TEMP The code that replaced TEMP with TEMPORARY didn't work with the expansion
Diffstat (limited to 'database/postgresql/postgresql_user.py')
-rw-r--r--database/postgresql/postgresql_user.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/database/postgresql/postgresql_user.py b/database/postgresql/postgresql_user.py
index 353d3ac3..cee5a9ae 100644
--- a/database/postgresql/postgresql_user.py
+++ b/database/postgresql/postgresql_user.py
@@ -490,10 +490,10 @@ def parse_role_attrs(role_attr_flags):
def normalize_privileges(privs, type_):
new_privs = set(privs)
- if 'ALL' in privs:
+ if 'ALL' in new_privs:
new_privs.update(VALID_PRIVS[type_])
new_privs.remove('ALL')
- if 'TEMP' in privs:
+ if 'TEMP' in new_privs:
new_privs.add('TEMPORARY')
new_privs.remove('TEMP')