mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 16:59:02 +08:00
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>
This commit is contained in:
parent
2871455e4e
commit
0aafa281a5
@ -100,10 +100,10 @@ def update():
|
|||||||
def detail():
|
def detail():
|
||||||
kb_id = request.args["kb_id"]
|
kb_id = request.args["kb_id"]
|
||||||
try:
|
try:
|
||||||
tenants = TenantService.get_joined_tenants_by_user_id(current_user.id)
|
tenants = UserTenantService.query(user_id=current_user.id)
|
||||||
for m in tenants:
|
for tenant in tenants:
|
||||||
if KnowledgebaseService.query(
|
if KnowledgebaseService.query(
|
||||||
tenant_id=m["tenant_id"], id=kb_id):
|
tenant_id=tenant.tenant_id, id=kb_id):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return get_json_result(
|
return get_json_result(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user