feat: add show_in_legal to admin content page editor

- Add "Show in Legal" checkbox to content page editor UI
- Update API schemas (ContentPageCreate, ContentPageUpdate, ContentPageResponse)
- Add show_in_legal parameter to service methods (create_page, update_page, etc.)
- Fix ContentPageNotFoundException to pass identifier correctly
- Fix UnauthorizedContentPageAccessException to use correct AuthorizationException API
- Add comprehensive unit tests for ContentPageService (35 tests)
- Add content page fixtures for testing
- Update CMS documentation with navigation categories diagram

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-28 20:27:20 +01:00
parent bd447ae7f2
commit 592a4fd7c2
9 changed files with 838 additions and 30 deletions

View File

@@ -23,7 +23,11 @@ class ContentPageNotFoundException(ResourceNotFoundException):
message = f"Content page not found: {identifier}"
else:
message = "Content page not found"
super().__init__(message=message, resource_type="content_page")
super().__init__(
message=message,
resource_type="content_page",
identifier=str(identifier) if identifier else "unknown",
)
class ContentPageAlreadyExistsException(ConflictException):
@@ -61,7 +65,8 @@ class UnauthorizedContentPageAccessException(AuthorizationException):
def __init__(self, action: str = "access"):
super().__init__(
message=f"Cannot {action} content pages from other vendors",
required_permission=f"content_page:{action}",
error_code="CONTENT_PAGE_ACCESS_DENIED",
details={"required_permission": f"content_page:{action}"},
)
@@ -71,7 +76,8 @@ class VendorNotAssociatedException(AuthorizationException):
def __init__(self):
super().__init__(
message="User is not associated with a vendor",
required_permission="vendor:member",
error_code="VENDOR_NOT_ASSOCIATED",
details={"required_permission": "vendor:member"},
)