Remove all code related to VALID_PRIVS and get_valid_privs()

This commit is contained in:
R.Sicart 2021-10-30 16:38:45 +02:00
parent 5522e45284
commit ac18eeaad5
3 changed files with 3 additions and 65 deletions

View file

@ -318,7 +318,6 @@ from ansible_collections.community.mysql.plugins.module_utils.user import (
handle_requiressl_in_priv_string,
InvalidPrivsError,
limit_resources,
get_valid_privs,
privileges_unpack,
sanitize_requires,
user_add,
@ -421,11 +420,7 @@ def main():
mode = get_mode(cursor)
except Exception as e:
module.fail_json(msg=to_native(e))
try:
valid_privs = get_valid_privs(cursor)
priv = privileges_unpack(priv, mode, valid_privs)
except Exception as e:
module.fail_json(msg="invalid privileges string: %s" % to_native(e))
priv = privileges_unpack(priv, mode)
if state == "present":
if user_exists(cursor, user, host, host_all):