mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-03 16:07:00 +00:00
Fail set_user_priv on a rejected privilege change
Every other /data call checks the status, this one discarded the response, so an SMM that refused the user record was reported to the caller as a successful privilege change.
This commit is contained in:
@@ -735,9 +735,11 @@ class SMMClient(object):
|
||||
username = bytes(rsp['data']).rstrip(b'\x00')
|
||||
if not isinstance(username, str):
|
||||
username = username.decode('utf8')
|
||||
await self.webrequest(
|
||||
rsp, status = await self.webrequest(
|
||||
'/data', 'set=user({0},1,{1},511,,4,15,0)'.format(
|
||||
uid, username))
|
||||
if status != 200:
|
||||
raise Exception(rsp)
|
||||
|
||||
async def reseat_bay(self, bay):
|
||||
bay = int(bay)
|
||||
|
||||
Reference in New Issue
Block a user