mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #7590 from llamallama/develop
Fixing grant_option False being evaluated as a string and therefore True
This commit is contained in:
commit
e1e8095d23
@ -1010,7 +1010,7 @@ def __grant_generate(grant,
|
||||
qry = 'GRANT {0} ON {1}.{2} TO {3!r}@{4!r}'.format(
|
||||
grant, dbc, table, user, host
|
||||
)
|
||||
if grant_option:
|
||||
if salt.utils.is_true(grant_option):
|
||||
qry += ' WITH GRANT OPTION'
|
||||
log.debug('Query generated: {0}'.format(qry))
|
||||
return qry
|
||||
@ -1161,7 +1161,7 @@ def grant_revoke(grant,
|
||||
return False
|
||||
cur = dbc.cursor()
|
||||
|
||||
if grant_option:
|
||||
if salt.utils.is_true(grant_option):
|
||||
grant += ', GRANT OPTION'
|
||||
qry = 'REVOKE {0} ON {1} FROM {2!r}@{3!r};'.format(
|
||||
grant, database, user, host
|
||||
|
Loading…
Reference in New Issue
Block a user