继续声明管理员的最高权限

This commit is contained in:
San Liy 2023-12-21 01:40:01 +08:00
parent 690f3bdd65
commit ff6c1627b0

View File

@ -118,7 +118,8 @@ class SioDecorator:
if sender_id != self.app.ctx.sio_config.self_id:
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])
sqt = SioRequest(app=self.app,