From ff6c1627b0f230721ab19a8561533ded870421ec Mon Sep 17 00:00:00 2001 From: adk23333 <2633103794@qq.com> Date: Thu, 21 Dec 2023 01:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E5=A3=B0=E6=98=8E=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E7=9A=84=E6=9C=80=E9=AB=98=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sio_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sio_model.py b/sio_model.py index 34984e8..ff61d9c 100644 --- a/sio_model.py +++ b/sio_model.py @@ -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,