继续声明管理员的最高权限
This commit is contained in:
parent
690f3bdd65
commit
ff6c1627b0
@ -118,7 +118,8 @@ class SioDecorator:
|
|||||||
|
|
||||||
if sender_id != self.app.ctx.sio_config.self_id:
|
if sender_id != self.app.ctx.sio_config.self_id:
|
||||||
e: AsyncEnforcer = self.app.ctx.e
|
e: AsyncEnforcer = self.app.ctx.e
|
||||||
if e.enforce(str(room_id), self._cmd[0][1:]):
|
if (e.enforce(str(room_id), self._cmd[0][1:]) or
|
||||||
|
(await e.has_role_for_user(str(sender_id), 'admin'))):
|
||||||
parser = ArgumentParser(self._cmd[0])
|
parser = ArgumentParser(self._cmd[0])
|
||||||
|
|
||||||
sqt = SioRequest(app=self.app,
|
sqt = SioRequest(app=self.app,
|
||||||
|
Loading…
Reference in New Issue
Block a user