mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
Require document privilege for PDF imports
This commit is contained in:
@@ -146,7 +146,8 @@ def setup_document_routes(session_manager, upload_handler=None) -> APIRouter:
|
|||||||
from src.document_processor import _process_pdf
|
from src.document_processor import _process_pdf
|
||||||
import os
|
import os
|
||||||
|
|
||||||
user = get_current_user(request)
|
from src.auth_helpers import require_privilege
|
||||||
|
user = require_privilege(request, "can_use_documents")
|
||||||
|
|
||||||
# session_id is optional — a library import isn't tied to a chat. When
|
# session_id is optional — a library import isn't tied to a chat. When
|
||||||
# given, validate it; otherwise the PDF becomes a session-less library
|
# given, validate it; otherwise the PDF becomes a session-less library
|
||||||
|
|||||||
Reference in New Issue
Block a user