From 6fcc6df62d29138ef62a455ce28bd961b7978dae Mon Sep 17 00:00:00 2001 From: atomi <1456417373@qq.com> Date: Fri, 22 Sep 2023 22:13:52 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8D=87=E7=BA=A7`casbin`=E5=88=B0v1.2?= =?UTF-8?q?9.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi_user_auth/__init__.py | 2 +- fastapi_user_auth/admin/actions.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fastapi_user_auth/__init__.py b/fastapi_user_auth/__init__.py index cf98626..2ba6bc3 100644 --- a/fastapi_user_auth/__init__.py +++ b/fastapi_user_auth/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.6.1" +__version__ = "0.6.2a3" __url__ = "https://github.com/amisadmin/fastapi_user_auth" import gettext diff --git a/fastapi_user_auth/admin/actions.py b/fastapi_user_auth/admin/actions.py index 689639c..89297a4 100644 --- a/fastapi_user_auth/admin/actions.py +++ b/fastapi_user_auth/admin/actions.py @@ -159,7 +159,7 @@ async def get_init_data(self, request: Request, **kwargs) -> BaseApiOut[Any]: subject = await self.get_subject_by_id(item_id) if not subject: return BaseApiOut(status=0, msg="暂不支持的模型") - role_keys = await self.site.auth.enforcer.get_implicit_roles_for_user(subject) + role_keys = await self.site.auth.enforcer.get_roles_for_user(subject) return BaseApiOut(data=self.schema(role_keys=",".join(role_keys).replace("r:", ""))) async def handle(self, request: Request, item_id: List[str], data: schema, **kwargs): diff --git a/pyproject.toml b/pyproject.toml index eaabf56..eb86c34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ "email-validator>=1.3.1,<2.0.0", "passlib>=1.7.4", "bcrypt>=4.0.0", - "casbin>=1.23.0", + "casbin>=1.29.0", "sqlmodelx>=0.0.5", ]