0f91b8bb7c
- Add SharedLink model with token, expiry, view limit, password hash
- Add migration 025_add_shared_links
- Add API endpoints: create, list, revoke (auth) + public info/download
- Add management UI at /shared-links with revoke controls
- Add public share landing page at /share/{token}
- Add Share button on file_view.html
- Add Shared Links to user dropdown in common.js
- Write 35 unit tests covering all scenarios
- Update UserGuide.md with sharing documentation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
25 lines
629 B
Python
25 lines
629 B
Python
"""View route for the Shared Links management page.
|
|
|
|
Renders the ``shared_links.html`` template where authenticated users can
|
|
create, view, and revoke their document share links.
|
|
"""
|
|
|
|
import logging
|
|
|
|
from fastapi import APIRouter, Request
|
|
|
|
from app.views.base import require_login, templates
|
|
|
|
logger = logging.getLogger(__name__)
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/shared-links")
|
|
@require_login
|
|
async def shared_links_page(request: Request):
|
|
"""Render the Shared Links management page."""
|
|
return templates.TemplateResponse(
|
|
"shared_links.html",
|
|
{"request": request, "page_title": "Shared Links"},
|
|
)
|