Skip to content

Commit

Permalink
Add Authorization checks (infiniflow#2218)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Add Authorization checks
infiniflow#2203

### Type of change


- [x] New Feature (non-breaking change which adds functionality)

Co-authored-by: Feiue <[email protected]>
  • Loading branch information
Feiue and Feiue authored Sep 3, 2024
1 parent 7e0fc53 commit 45c1c33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/apps/kb_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 45c1c33

Please sign in to comment.