feat: tenant isolation Phase 0 — app-layer filters, UUID audit, CI gate #132
@@ -392,8 +392,8 @@ async def get_tree(
|
|||||||
|
|
||||||
if not tree.is_active or not can_access_tree(current_user, tree):
|
if not tree.is_active or not can_access_tree(current_user, tree):
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_403_FORBIDDEN,
|
status_code=status.HTTP_404_NOT_FOUND,
|
||||||
detail="You don't have access to this tree"
|
detail="Tree not found"
|
||||||
)
|
)
|
||||||
|
|
||||||
return build_full_tree_response(tree)
|
return build_full_tree_response(tree)
|
||||||
@@ -611,8 +611,8 @@ async def update_tree(
|
|||||||
|
|
||||||
if not can_edit_tree(current_user, tree):
|
if not can_edit_tree(current_user, tree):
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_403_FORBIDDEN,
|
status_code=status.HTTP_404_NOT_FOUND,
|
||||||
detail="You can only edit your own trees"
|
detail="Tree not found"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Extract tags for separate handling
|
# Extract tags for separate handling
|
||||||
@@ -1145,8 +1145,8 @@ async def update_tree_visibility(
|
|||||||
|
|
||||||
if not can_edit_tree(current_user, tree):
|
if not can_edit_tree(current_user, tree):
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_403_FORBIDDEN,
|
status_code=status.HTTP_404_NOT_FOUND,
|
||||||
detail="You can only edit your own trees"
|
detail="Tree not found"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Update visibility
|
# Update visibility
|
||||||
|
|||||||
Reference in New Issue
Block a user