Procházet zdrojové kódy

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 před 1 rokem
rodič
revize
0aafa281a5
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3
    3
      api/apps/kb_app.py

+ 3
- 3
api/apps/kb_app.py Zobrazit soubor

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

Načítá se…
Zrušit
Uložit