### What problem does this PR solve? Add Authorization checks #2203 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Co-authored-by: Feiue <10215101452@stu.ecun.edu.cn>tags/v0.11.0
| @@ -100,10 +100,10 @@ def update(): | |||
| def detail(): | |||
| kb_id = request.args["kb_id"] | |||
| try: | |||
| tenants = TenantService.get_joined_tenants_by_user_id(current_user.id) | |||
| for m in tenants: | |||
| tenants = UserTenantService.query(user_id=current_user.id) | |||
| for tenant in tenants: | |||
| if KnowledgebaseService.query( | |||
| tenant_id=m["tenant_id"], id=kb_id): | |||
| tenant_id=tenant.tenant_id, id=kb_id): | |||
| break | |||
| else: | |||
| return get_json_result( | |||