mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-19 00:41:28 -07:00
postgresql_privs: Fix bug with grant_option (#796)
This commit is contained in:
parent
b797922e20
commit
f3b82a9470
3 changed files with 139 additions and 6 deletions
|
@ -864,12 +864,14 @@ class QueryBuilder(object):
|
|||
self.query[-1] += ' WITH ADMIN OPTION;'
|
||||
else:
|
||||
self.query[-1] += ' WITH GRANT OPTION;'
|
||||
else:
|
||||
elif self._grant_option is False:
|
||||
self.query[-1] += ';'
|
||||
if self._obj_type == 'group':
|
||||
self.query.append('REVOKE ADMIN OPTION FOR {0} FROM {1};'.format(self._set_what, self._for_whom))
|
||||
elif not self._obj_type == 'default_privs':
|
||||
self.query.append('REVOKE GRANT OPTION FOR {0} FROM {1};'.format(self._set_what, self._for_whom))
|
||||
else:
|
||||
self.query[-1] += ';'
|
||||
|
||||
def add_default_priv(self):
|
||||
for obj in self._objs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue