mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2026-02-04 07:11:49 +00:00
fix: case when grant options is set with no other user permissions in… (#744)
* fix: case when grant options is set with no other user permissions in mariadb
* Create changelog fragment
* fix: wrong file name ext
* Update changelogs/fragments/fix_user_perms_revoke_grant_option.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
---------
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit 1cb9f369d0)
This commit is contained in:
parent
8445fa13aa
commit
b3a7a25aef
2 changed files with 3 additions and 1 deletions
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- mysql_user, mysql_role - fix not existent grant when revoking perms on user/role which do not have any other perms than grant option (https://github.com/ansible-collections/community.mysql/issues/664).
|
||||
|
|
@ -886,7 +886,7 @@ def privileges_revoke(cursor, user, host, db_table, priv, grant_option, maria_ro
|
|||
cursor.execute(query, (user, host))
|
||||
priv_string = ",".join([p for p in priv if p not in ('GRANT', )])
|
||||
|
||||
if priv_string != "":
|
||||
if priv_string != "" and not (grant_option and priv_string == "USAGE"):
|
||||
query = ["REVOKE %s ON %s" % (priv_string, db_table)]
|
||||
|
||||
if not maria_role:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue