Skip to content

Commit 63dbd02

Browse files
committed
fix: The type of resource authorization is incorrect
1 parent 6a87ccd commit 63dbd02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/system_manage/serializers/user_resource_permission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def auth_resource(self, resource_id: str):
136136
workspace_id = self.data.get('workspace_id')
137137
user_id = self.data.get('user_id')
138138
wurp = QuerySet(WorkspaceUserResourcePermission).filter(auth_target_type=auth_target_type,
139-
workspace_id=workspace_id).first()
139+
workspace_id=workspace_id, user_id=user_id).first()
140140
auth_type = wurp.auth_type if wurp else (
141141
ResourceAuthType.RESOURCE_PERMISSION_GROUP if edition == 'CE' else ResourceAuthType.ROLE)
142142
# 自动授权给创建者

0 commit comments

Comments
 (0)