mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-24 11:21:26 -07:00
Fix privilege changing everytime (#438)
* Compare privileges from before and after manipulation * Add unit tests * Fix FIXME integration tests related to this issue * Fix sanity check * Fix assertion when appending privs in mysql_role_initial integration tests * Fix pylint * [ci-skip] Add changelog fragment * Fix: missing fragment file extension * Replace privileges_equal() by a comparison * Fix: sanity pylint * Fix: forgot to remove privileges_equal import from unit tests
This commit is contained in:
parent
ea73d408c3
commit
2d75bc19b8
4 changed files with 13 additions and 13 deletions
|
@ -385,7 +385,10 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
privileges_revoke(cursor, user, host, db_table, revoke_privs, grant_option, maria_role)
|
||||
if len(grant_privs) > 0:
|
||||
privileges_grant(cursor, user, host, db_table, grant_privs, tls_requires, maria_role)
|
||||
changed = True
|
||||
|
||||
# after privilege manipulation, compare privileges from before and now
|
||||
after_priv = privileges_get(cursor, user, host, maria_role)
|
||||
changed = changed or (curr_priv != after_priv)
|
||||
|
||||
if role:
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue