Преглед изворни кода

Add Authorization checks (#2218)

### 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
LiuHua пре 1 година
родитељ
комит
0aafa281a5
No account linked to committer's email address
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3
    3
      api/apps/kb_app.py

+ 3
- 3
api/apps/kb_app.py Прегледај датотеку

@@ -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(

Loading…
Откажи
Сачувај