feat: vault DIR — garde d'exclusion sur les lectures xlsx (vault Spark)
This commit is contained in:
@@ -246,6 +246,8 @@ def api_file_xlsx_dashboard(
|
|||||||
"""
|
"""
|
||||||
if not check_vault_access(vault_name, current_user):
|
if not check_vault_access(vault_name, current_user):
|
||||||
raise HTTPException(status_code=403, detail=f"Accès refusé à la vault '{vault_name}'")
|
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)
|
_vault_root = get_vault_root(vault_name)
|
||||||
file_path = resolve_safe_path(_vault_root, path)
|
file_path = resolve_safe_path(_vault_root, path)
|
||||||
if not file_path.is_file():
|
if not file_path.is_file():
|
||||||
@@ -314,6 +316,9 @@ def api_file_xlsx_sheet(
|
|||||||
if not vault_data:
|
if not vault_data:
|
||||||
raise HTTPException(status_code=404, detail=f"Vault '{vault_name}' not found")
|
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)
|
file_path = resolve_safe_path(Path(vault_data["path"]), path)
|
||||||
if not file_path.is_file():
|
if not file_path.is_file():
|
||||||
raise HTTPException(status_code=404, detail=f"File not found: {path}")
|
raise HTTPException(status_code=404, detail=f"File not found: {path}")
|
||||||
|
|||||||
Reference in New Issue
Block a user