3.8 KiB
Content Management Specification
Purpose
Leírja a weboldal Payload CMS-alapú tartalomszerkesztését, admin hozzáférését, publikálását és az adminisztrált média/partner tartalmak kezelését.
Requirements
Requirement: Protected Payload administration
The CMS SHALL require an authenticated user for administration and protected Users collection operations. The current user model SHALL treat every authenticated user as an administrator.
Scenario: Unauthenticated user attempts a protected admin operation
- WHEN a request without an authenticated user attempts to read or modify a protected Users or content record through the Payload API
- THEN Payload SHALL deny the operation
Scenario: Login attempts exceed the configured limit
- WHEN an account reaches five failed login attempts
- THEN Payload SHALL lock that account for ten minutes
Requirement: Editable site content
The CMS SHALL provide editable Home, About, Services, Contact, and Common globals, and LegalPages, Partners, Media, ContactSubmissions, and Users collections. Public page content SHALL be obtained from these Payload records rather than hard-coded into page components.
Scenario: An administrator edits a public page global
- WHEN an authenticated administrator saves a supported global
- THEN the CMS SHALL persist the global and make its published values available to the public site
Scenario: An administrator manages legal pages or partners
- WHEN an authenticated administrator creates or updates a LegalPages or Partners record
- THEN the CMS SHALL persist the record for use by the corresponding public page
Requirement: Draft and versioned publishing
The site globals and the LegalPages and Partners collections SHALL support drafts and version history, with a maximum of 50 retained versions per global or document. Publishing SHALL be an explicit administrator action. Public content reads SHALL return published data rather than drafts.
Scenario: Save an unpublished draft
- WHEN an administrator saves a draft of a supported global, legal page, or partner record
- THEN the draft SHALL be retained in version history and SHALL NOT replace the published content rendered publicly
Scenario: Publish a draft
- WHEN an administrator explicitly publishes a saved draft
- THEN subsequent public requests SHALL be able to render the newly published content without an application redeployment
Requirement: Hungarian and English locale support
The CMS SHALL configure Hungarian (hu) and English (en) locales, use Hungarian as
the default locale, and enable fallback to Hungarian for localized fields with no
English value. This requirement applies only to fields configured as localized; it
does not imply that every current content field has a translation.
Scenario: Read a localized field without an English translation
- WHEN the public site requests a localized field in English and that field has no English value
- THEN Payload SHALL fall back to the Hungarian value
Requirement: Public partner media
The CMS SHALL allow authenticated administrators to manage partner records and image media. Partner logos SHALL be optional in the CMS, but the public site SHALL render a partner only when a usable logo is available. Media reads required by public pages SHALL be publicly accessible; media writes SHALL remain protected.
Scenario: Public page loads a partner logo
- WHEN the public site requests an uploaded partner image
- THEN the media endpoint SHALL allow the read without an administrator session
Scenario: An unauthenticated user attempts to change media
- WHEN an unauthenticated user attempts to create, update, or delete media
- THEN the CMS SHALL deny the operation