From 26536112ceaab5dee7ac2a35959256d0c77e082d Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:03:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98=20(#856)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/setting/models/model_management.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/setting/models/model_management.py b/apps/setting/models/model_management.py index e696e0630..c2f203fb0 100644 --- a/apps/setting/models/model_management.py +++ b/apps/setting/models/model_management.py @@ -57,9 +57,9 @@ class Model(AppModelMixin): default=PermissionType.PRIVATE) def is_permission(self, user_id): - if self.permission_type == PermissionType.PRIVATE and str(user_id) == str(self.user_id): - return False - return True + if self.permission_type == PermissionType.PUBLIC or str(user_id) == str(self.user_id): + return True + return False class Meta: db_table = "model"