diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2014-12-03 14:43:20 -0800 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2014-12-04 15:46:34 -0600 |
commit | 0f174ca4538aabfddc4d84d37ed411060896f533 (patch) | |
tree | 89d7d38e477e06965abf119d1821566b1edfd9af | |
parent | 4320a3d20a52a6afb12ef6a86a265530edb7eebf (diff) | |
download | ansible-modules-core-0f174ca4538aabfddc4d84d37ed411060896f533.tar.gz |
Add USAGE as a valid privilege
-rw-r--r-- | database/postgresql/postgresql_privs.py | 2 | ||||
-rw-r--r-- | database/postgresql/postgresql_user.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/database/postgresql/postgresql_privs.py b/database/postgresql/postgresql_privs.py index febdc9ed..94046566 100644 --- a/database/postgresql/postgresql_privs.py +++ b/database/postgresql/postgresql_privs.py @@ -232,7 +232,7 @@ except ImportError: VALID_PRIVS = frozenset(('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER', 'CREATE', 'CONNECT', - 'TEMPORARY', 'TEMP', 'EXECUTE', 'USAGE', 'ALL')) + 'TEMPORARY', 'TEMP', 'EXECUTE', 'USAGE', 'ALL', 'USAGE')) class Error(Exception): pass diff --git a/database/postgresql/postgresql_user.py b/database/postgresql/postgresql_user.py index 00001bdc..75c7419b 100644 --- a/database/postgresql/postgresql_user.py +++ b/database/postgresql/postgresql_user.py @@ -157,8 +157,8 @@ else: _flags = ('SUPERUSER', 'CREATEROLE', 'CREATEUSER', 'CREATEDB', 'INHERIT', 'LOGIN', 'REPLICATION') VALID_FLAGS = frozenset(itertools.chain(_flags, ('NO%s' % f for f in _flags))) -VALID_PRIVS = dict(table=frozenset(('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER', 'ALL')), - database=frozenset(('CREATE', 'CONNECT', 'TEMPORARY', 'TEMP', 'ALL')), +VALID_PRIVS = dict(table=frozenset(('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER', 'ALL', 'USAGE')), + database=frozenset(('CREATE', 'CONNECT', 'TEMPORARY', 'TEMP', 'ALL', 'USAGE')), ) class InvalidFlagsError(Exception): |