This commit is contained in:
Timothy Jaeryang Baek
2026-02-21 15:35:34 -06:00
parent c114fd6876
commit 631e30e22d
26 changed files with 177 additions and 164 deletions
+3 -1
View File
@@ -400,7 +400,9 @@ async def search_files(
Uses SQL-based filtering with pagination for better performance.
"""
# Determine user_id: null for admin with bypass (search all), user.id otherwise
user_id = None if (user.role == "admin" and BYPASS_ADMIN_ACCESS_CONTROL) else user.id
user_id = (
None if (user.role == "admin" and BYPASS_ADMIN_ACCESS_CONTROL) else user.id
)
# Use optimized database query with pagination
files = Files.search_files(