Add USAGE as a valid privilege
This commit is contained in:
parent
c49a20b0e5
commit
9fde3c2dc5
2 changed files with 3 additions and 3 deletions
|
@ -238,7 +238,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
|
||||
|
||||
|
|
|
@ -162,8 +162,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):
|
||||
|
|
Loading…
Reference in a new issue