summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2026-08-09Escape feed content with Builder rather than by handerdgeist
Builder escapes by default; the three feed templates no longer call CGI.escapeHTML. This fixes two sites that never escaped at all: the tag feed's externally supplied :tag segment, interpolated into its title, self link and id, and dc:creator in the RDF template. Subscribers see one difference: quotes and apostrophes arrive raw, which is valid in element text. config/initializers/xmlparser.rb, which redefined Builder::XmlBase#_escape as the identity function, is gone. XML::Node#replace_with went with it, no callers.
2026-08-09Let the RSS templates raise in testserdgeist
2026-08-09Load the test schema through Rails, and keep the search trigger installederdgeist
2026-08-09Drop nodes.external_urlerdgeist
The column moved to page.rb and was now written only by publish_draft! and by the chapter seed, and read by nothing. lib/tasks/pages.rake goes with it. backfill_external_url reads the dropped column. backfill_address is spent and no longer safe to re-run.
2026-08-09Report every editorial attribute in the revision differdgeist
diff_against gained external_url, published_at and user. The view renders each metadata section only when that attribute changed, and says so once when none did. Metadata now precedes the locale pointer, which speaks only of translations: above the metadata it read as "nothing changed" on a revision that had moved the page.
2026-08-09Attach an asset to a page from the asset's own pageerdgeist
The picker moves from assets/edit to assets/show, where the list of attached pages already is. A member route, POST assets/:id/attach_to_node, replaces the ride on #update. Supersedes the picker wiring in the previous commit; what remains of it is @attach_node in #create, the flash composition and the corrected hint.
2026-08-09Attach an asset to a page from its edit formerdgeist
2026-08-09Refuse destroying an asset that is still attachederdgeist
2026-08-09Attach assets to the draft instead of to every lifecycle rowerdgeist
Node#attach_asset! writes to the node's draft alone, creating one from the head when none is pending. It refuses when another user holds the lock, and when an autosave already exists The asset_attach verb goes with it. create_new_draft names the editor on the draft it creates and the publish entry's asset delta reports the attachment.
2026-08-08Move the external homepage onto the drafterdgeist
2026-08-08Pin the disclosure partial against a silent fallbackerdgeist
2026-08-07Move the pending address from the node onto the drafterdgeist
2026-08-06Fix test that expected old sitemap collapsing behaviourerdgeist
2026-08-06Re-structure sitemap, all subpages collapsed by default, visually tightenederdgeist
2026-08-06Let editors set a node external homepage, gated and witnessederdgeist
2026-08-06Rebuild the sitemap rows around the shared title and action patternserdgeist
2026-08-05Search assets and events, and order events by when they happenerdgeist
2026-08-04Give node lists a flag column and a shared action barerdgeist
2026-08-04Witness every promotion and demotion made through the roles formerdgeist
2026-08-03Require elevation before editing another accounterdgeist
2026-08-03Render dates, booleans and counts through the locale fileserdgeist
2026-08-03Believe the file over the browser about what was uploadederdgeist
2026-08-03Display stale accounts in users#indexerdgeist
2026-08-02Witness calendar entrieserdgeist
2026-08-02Witness account creationerdgeist
2026-08-02Test the neighbour revision pair arithmeticerdgeist
2026-08-02Test that aggregate? keeps the attributes the editor permitserdgeist
2026-08-02Keep the compared translation independent of the interface languageerdgeist
2026-08-01Require a second factor for elevation, not for holding adminerdgeist
2026-08-01Allow aggregate to order by slug and paint chapters list more nicelyerdgeist
2026-08-01Let Redaktion grant and revoke its own roleerdgeist
Any holder may add or remove another account, witnessed as redaktion_grant/revoke so the vouching is legible. Not behind elevation: onboarding must not wait for a keyholder, and a compromised Redaktion account can already publish.
2026-08-01Require a fresh second factor for user managementerdgeist
Administrative actions are gated behind a 30-minute elevation window: creating and retiring accounts, editing roles, clearing a second factor. Reading the list is not gated, and content work is untouched. elevated? is tied to is_admin?, so losing the role closes the window at once. The window opens when the second factor verifies at login, so an admin heading straight for user management is already elevated, and closes on logout with the other session state. Five wrong codes end the session, mirroring the login challenge. users#update carries no elevation filter, since self-service reaches it; the role field is gated in user_params instead and fails closed.
2026-08-01Declare role requirements per controllererdgeist
RoleRequired supplies require_redaktion and require_admin for surfaces that are not nodes and so cannot be reached by Node#restricted?. Navigation is content rather than plumbing, so menu_items requires redaktion. User management is janitorial and requires admin: index, new, create, reset_otp, deactivate, reactivate. verify_status now also covers show, without which any logged-in user could read any account by walking a small id space. Editing your own account stays open. The dashboard hides the Users and Navigation buttons from those who cannot use them; everything else stays visible to everyone. Both denials share one message and land on the dashboard. Adds redella (redaktion) and alufa (redaktion + alumni) fixtures.
2026-07-31Warn before the gate refuses, and check restore destinationserdgeist
nodes#new marks the kinds that place under /updates, derived from each kind's own path_prefix. The three parent pickers mark candidates the current user cannot publish into; menu_search returns needs_redaktion per result, computed per user rather than as a bare restricted flag, and the menu-item picker opts out. restore_from_trash! checks its destination: the restore is the move, applied rather than staged, so no later publish would have caught it. The node returns as a draft either way.
2026-07-31Show the gate before it refuses, and check the destinationerdgeist
nodes#show renders publish and trash as disabled_action spans with a hint naming what an editor can still do, matching how locked_by_other already reads. Editing and reverting stay live: drafting is free everywhere.
2026-07-31Bind aggregates over scoped tags to their subtreeerdgeist
CccConventions::TAG_SCOPES maps "update" and "pressemitteilung" to /updates and "disclosure" to /disclosure. Page.aggregate applies the mapping, so an aggregate over one of those tags is bounded by its subtree regardless of what the shortcode says. Tags stay unrestricted; positions are publish-gated. Both RSS actions call Page.aggregate rather than repeating its tag join. Empty feeds no longer crash: Atom falls back to the current time for the required <updated>, and the optional dc:date is omitted.
2026-07-31Gate live-content changes on restricted surfaceserdgeist
publish_draft!, trash!, destroy_from_trash!, attach_asset! and Asset#destroy_witnessed! now refuse unless the acting user holds redaktion, and only when the subject is on a restricted surface: the front page, the updates tree that feeds ~100k subscribers, or disclosure. Drafting, autosaving, tagging and creating stay free everywhere for everyone. Enforcement is in the models rather than the controllers, since attach_asset! and the rest are reachable from rake tasks and internal paths. It follows the errors.add-plus-bare-raise pattern the rest of Node already uses, so every existing RecordInvalid rescue reports it with a localised message; only assets_controller#destroy needed a rescue added. A nil user is treated as a system context and bypasses the gate. The default nil on three of those verbs is what makes that reachable, and removing those defaults once every call site passes a user is the next tightening.
2026-07-31Replace user deletion with deactivationerdgeist
Deactivation adds the alumni role and leaves the others in place, so reactivation is lossless and nobody has to remember what an account held. login_from_session checks alumni? on every request, so a signed-in user is locked out on their next one without any session invalidation. Guards prevent deactivating yourself or the last active admin, and both verbs are witnessed in the action log.
2026-07-31Group user accounts by roleerdgeist
Replaces the two-way admin/user split with four groups ordered by capability: administration, Redaktion, editors, alumni. alumni takes precedence over capability in role_group, so a retired admin appears at the bottom rather than the top. Forms now offer the three roles as checkboxes rather than a single admin checkbox, with a trailing hidden blank so an empty set can be posted, and user_params permits roles only for admins. Three create buttons prefill the common combinations.
2026-07-31Retire the unused per-node permission subsystemerdgeist
Every path through Permission raised or lied: validates_presence_of on a boolean made granted = false unsaveable, since false.blank? is true; get_permission_for read a nonexistent identifier attribute; has_permission? called an undefined plural method and returned a truthy relation in every case; and set_permission mutated granted without saving. Nothing outside the model referenced it and the table was empty.
2026-07-30Localise model validation messages and refusal reasonserdgeist
2026-07-30Canonicalise per locale and declare hreflang alternateserdgeist
German content is reachable at both /updates/foo and /de/updates/foo, and a page with no English translation renders German at /en/updates/foo through the fallback chain, so three URLs each claimed to be canonical. Both tags now derive from one locale-to-URL function, which points every duplicate at the address of the version actually served, the unprefixed German URL, matching default_url_options. Alternates are declared only for locales in which the page genuinely has a translation, since /en/ serving German through the fallback is not an English version of the page. x-default points at German, the site's primary language.
2026-07-30Emit per-page Open Graph metadataerdgeist
Replaces one hardcoded German description and an unrenderable SVG with per-page title, description, canonical URL, locale and publication date, plus the card variant or a site-wide default.
2026-07-30Remove dangling page references from the node fixtureserdgeist
2026-07-28Let editors manage menu titles in both localeserdgeist
2026-07-27Pin admin content reads to the default localeerdgeist
2026-07-27Surface held locks in the dashboard's work-in-progress widgeterdgeist
A lock with no draft or autosave behind it was invisible to everyone including its holder, until the next editor collided with it. work_in_progress now admits those nodes, and the widget names the holder rather than the last editor on any locked row. Also flips the ordering to stalest-first, so a backlog reads as a queue rather than a feed, and gives the heading a real total: the count came from the already-limited relation and could never exceed five.
2026-07-25Extract admin strings to i18n: revisions, page_translations, and menu items,erdgeist
2026-07-25Retire the unroutable occurrences scaffoldingerdgeist
2026-07-25Extract flashes to i18n and stop dispatching on submit labelserdgeist