mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-29 04:50:21 +00:00
Handle API change for setting user name
The web api now requires the word Administrator instead of the number 4.
This commit is contained in:
parent
7610f9b963
commit
4768bc257a
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user