feat(sharing): add document sharing with expiring links
- 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>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""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"},
|
||||
)
|
||||
Reference in New Issue
Block a user