feat: vault DIR — garde d'exclusion sur les lectures xlsx (vault Spark)

This commit is contained in:
Spark
2026-11-03 14:09:12 -05:00
committed by bruno
parent 3ba8b7b667
commit bd5507d6ef
+5
View File
@@ -246,6 +246,8 @@ def api_file_xlsx_dashboard(
"""
if not check_vault_access(vault_name, current_user):
raise HTTPException(status_code=403, detail=f"Accès refusé à la vault '{vault_name}'")
if chemin_exclu(vault_name, path):
raise HTTPException(status_code=404, detail=f"File not found: {path}")
_vault_root = get_vault_root(vault_name)
file_path = resolve_safe_path(_vault_root, path)
if not file_path.is_file():
@@ -314,6 +316,9 @@ def api_file_xlsx_sheet(
if not vault_data:
raise HTTPException(status_code=404, detail=f"Vault '{vault_name}' not found")
if chemin_exclu(vault_name, path):
raise HTTPException(status_code=404, detail=f"File not found: {path}")
file_path = resolve_safe_path(Path(vault_data["path"]), path)
if not file_path.is_file():
raise HTTPException(status_code=404, detail=f"File not found: {path}")