refac
This commit is contained in:
1 parent
259d5ca596
commit
93bab8d822
3 files changed
+14
-12
No files matched your search
@@ -32,6 +32,10 @@ def has_access_to_file(
|
||||
if not file:
|
||||
return False
|
||||
|
||||
# Direct ownership
|
||||
if file.user_id == user.id:
|
||||
return True
|
||||
|
||||
# Check if the file is associated with any knowledge bases the user has access to
|
||||
knowledge_bases = Knowledges.get_knowledges_by_file_id(file_id, db=db)
|
||||
user_group_ids = {
|
||||
|
||||
Reference in new issue
Block a user