Correction de l’appel API et des constantes
This commit is contained in:
parent
1228dc1365
commit
59ae3af3c6
|
@ -93,11 +93,11 @@ def run_module():
|
|||
"Gestion des identifiants ENT": 12,
|
||||
"Gestion de la réplication LDAP": 13,
|
||||
"Gestion de la synchronisation AAF": 14,
|
||||
"Ecriture (serveurs)": 15,
|
||||
"Ecriture (modules)": 16,
|
||||
"Ecriture (etablissements)": 17,
|
||||
"Actions sans modification de configuration": 18,
|
||||
"Mise à jour du mot de passe (annuaire local)": 19,
|
||||
"Ecriture (serveurs)": 21,
|
||||
"Ecriture (modules)": 22,
|
||||
"Ecriture (etablissements)": 23,
|
||||
"Actions sans modification de configuration": 31,
|
||||
"Mise à jour du mot de passe (annuaire local)": 40,
|
||||
}
|
||||
mapped_keys = {value: key for key, value in key_mapping.items()}
|
||||
|
||||
|
@ -138,7 +138,7 @@ def run_module():
|
|||
proxy_addr = "http://{0}:{1}@localhost:{2}/".format(module.params['zephir_user'], module.params['zephir_user_password'], port_zephir)
|
||||
proxy = EoleProxy(proxy_addr)
|
||||
|
||||
return_code, permissions = proxy.users.get_permissions(module.params['user'])
|
||||
return_code, permissions = proxy.get_permissions(module.params['user'])
|
||||
if return_code:
|
||||
result['user'] = module.params['user']
|
||||
result['permissions'] = [mapped_keys[p] for p in permissions]
|
||||
|
@ -153,7 +153,7 @@ def run_module():
|
|||
elif module.params['state'] == 'absent':
|
||||
permissions = old_permissions.difference(set(new_permissions))
|
||||
|
||||
return_code, proxy_msg = proxy.users.save_permissions(str(list(permissions)))
|
||||
return_code, proxy_msg = proxy.save_permissions(module.params['user'], str(list(permissions)))
|
||||
if return_code:
|
||||
result['changed'] = True
|
||||
result['permissions'] = [mapped_keys[p] for p in permissions]
|
||||
|
|
Loading…
Reference in New Issue