From 4768bc257af402753eb68f7b6472629831745b2c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 15 Dec 2020 16:44:55 -0500 Subject: [PATCH] Handle API change for setting user name The web api now requires the word Administrator instead of the number 4. --- confluent_server/confluent/discovery/handlers/xcc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index 7cb69473..54288308 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -322,9 +322,13 @@ class NodeHandler(immhandler.NodeHandler): wc.grab_json_response('/api/function', {'USER_UserPassChange': '{0},{1}'.format(uid, passwd)}) if username != 'USERID': - wc.grab_json_response( + rsp, status = wc.grab_json_response( '/api/function', {'USER_UserModify': '{0},{1},,1,4,0,0,0,0,,8,'.format(uid, username)}) + if status == 200 and rsp.get('return', 0) == 762: + rsp, status = wc.grab_json_response( + '/api/function', + {'USER_UserModify': '{0},{1},,1,Administrator,0,0,0,0,,8,'.format(uid, username)}) self.tmppasswd = None self._currcreds = (username, passwd)