From 47cb92f74f17c31c72a535e3ae153c328f85be53 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Wed, 22 Jul 2015 13:34:52 +1000 Subject: [PATCH] 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 --- database/postgresql/postgresql_user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/postgresql/postgresql_user.py b/database/postgresql/postgresql_user.py index 353d3ac3d93..cee5a9ae131 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')