Commit Graph

542 Commits

Author SHA1 Message Date
Jakub Zych
0ade662a04 fix(32.2): WR-06 check the consent provider's redirect against the request's redirect URI
cabana loads the pending request on both decisions and refuses (500) a Decide answer whose scheme, user info, host, path or opaque part differ from the registered redirect URI. The admin SPA also refuses blob:, file:, about: and filesystem: and a destination that does not return to the host the consent card showed. Regenerated the admin OpenAPI document and rebuilt modules/boardwalk/dist.
2026-11-21 09:32:54 +01:00
Jakub Zych
60bc6ee68f fix(32.2): WR-05 hand the deactivate revocation the plain transaction
The deactivate lifecycle fired BackendAccessRevokedEvent with actionDB's Unscoped session, so a listener's Delete through ev.Tx was a hard delete only for that reason. It now passes the save's transaction like every other site.
2026-11-21 09:21:59 +01:00
Jakub Zych
a261a8fdfe fix(32.2): WR-04 never fire BackendAccessRevokedEvent without the save's transaction
fireBackendAccessRevoked refuses a nil tx before any listener runs, and the Administrators and Roles update hooks fail closed (like the delete hook) when the save carries no transaction, instead of firing with whatever TxFromContext answered.
2026-11-21 09:17:33 +01:00
Jakub Zych
19bb3f9485 fix(32.2): WR-03 refuse an unknown MCPGrant.Subject instead of treating it as a user grant
pier now resolves only the empty subject (frontend user grant) and pact.MCPGrantSubjectBackend; any other value is ErrUnauthorized and never reaches the linked-administrator lookup.
2026-11-21 09:11:46 +01:00
Jakub Zych
1dcc2ed06d fix(32.2): WR-02 refuse a ConsentPath that is not a same-origin path
Add wristband.CheckConsentPath (additive, for hosts to call at boot) and make Authorize answer 500 before storing a pending request while the configured path fails it, so the handoff can never leave the issuer's origin.
2026-11-21 09:08:12 +01:00
Jakub Zych
fa7a84821e fix(32.2): WR-01 apply DefaultScopes to offline_access-only authorize requests
A request naming only offline_access now gets Options.DefaultScopes (when set) plus offline access instead of a pending request with zero data scopes. The read fallback is only used when the server accepts read; otherwise the request is refused with invalid_scope (RFC 6749 3.3).
2026-11-21 09:05:07 +01:00
Jakub Zych
b1b96d85da fix(32.2-05): run admin:reset-password in a lagoon transaction
The reset fired BackendAccessRevokedEvent inside a plain GORM
transaction, where lagoon.AfterCommit refuses to run, so a listener's
after-commit work (sm-oauthserver-plugin's revoked MCPSubjectChanged
events that end MCP sessions) never ran for this D-13 site.
TestBackendAccessRevokedEvent now asserts the after-commit callback runs
once for a committed reset and not for a vetoed one.
2026-11-21 02:14:12 +01:00
Jakub Zych
7ecfa6087d test(32.2-05): unit tests for administrator MCP grants, admin consent, account items and access revocation
- wristband: TestAuthorizeConsentPath, TestAuthorizeDefaultScopes
- pier: TestBackendOnlyGrant, TestLinkedGrantNoScopeLimit (Docker)
- cabana: TestTokenScopeNames, TestMCPAdminConsent, TestAccountContributionItems,
  TestBackendAccessRevokedEvent (Docker); export_test.go exposes the event
  helper for the de-duplication case
2026-11-21 02:00:16 +01:00
Jakub Zych
ee754b6b5d chore(32.2-02): rebuild embedded admin dist with the connect screen and account items 2026-11-21 00:53:01 +01:00
Jakub Zych
2708982601 feat(32.2-02): My account item rows with per-row actions; connect screen docs
- AccountContributions renders a section's items as list rows (title,
  subtitle, meta joined with ' · ') with one button per item action, or
  the dashed empty block; sections without items render as before
- item actions confirm with :title filled as text, post to
  /account/contribution-items/{name}/{item}/actions/{action}, reload and
  focus the section heading; 404 toasts item_gone and reloads
- myaccount.items_empty, item_gone, item_action_named in en and pl
- docs/backend/admin-spa.md: the /connect screen and My account item rows
2026-11-21 00:52:23 +01:00
Jakub Zych
f46c90f7fb feat(32.2-02): admin consent card at /connect posts the decision and leaves for redirect_uri
- /connect route without shell and without public, so login round-trips back
- ConnectView ready state: client mark, fact box, catalog-order scope picker
  with the token-dialog * rule, Stay connected, Deny and Allow
- Allow/Deny POST /mcp/consent/{request}; the browser leaves through
  window.location.assign after refusing javascript:, data: and vbscript:
- MCPConsent, MCPConsentDecision and AccountItem type aliases
- backend::lang.mcp_connect copy in en and pl; connect page title
- smoke test: ticks, POST body, assign called, router never used
2026-11-21 00:42:01 +01:00
Jakub Zych
fcc7bbde25 feat(32.2-01): in-transaction BackendAccessRevokedEvent at every admin access change
- cabana: BackendAccessRevokedEvent with reasons deleted, deactivated,
  password_changed, password_set, password_reset and permissions, fired
  synchronously inside the save's transaction; a listener error rolls back
- fired on admin delete, deactivate, a password set by another admin, an own
  password change, admin:reset-password, a role/permissions/superuser change
  and a role's permission change (every holder); MCPSubjectChanged unchanged
- role delete fires nothing (refused while the role has holders); no sign
  out everywhere action exists
- smoke test TestBackendAccessRevokedSmoke (Postgres)
2026-11-21 00:32:26 +01:00
Jakub Zych
3f7ce6020d feat(32.2-01): per-item rows and item actions on My account contributions
- pact: AccountContribution.Items/ItemActions/ItemsEmpty, AccountItem,
  AccountItemAction, AccountItemActionInput, ErrAccountItemNotFound
- cabana: the list sends items (null without Items), permitted item actions
  and the empty line; boot refuses item actions without Items
- cabana: POST {api}/account/contribution-items/{name}/{item}/actions/{action}
  runs only for an item the administrator's own Items listed, in a transaction
  (path outside /account/contributions/ to avoid a ServeMux overlap)
- swag views; admin.json and schema.d.ts regenerated; route inventories
2026-11-21 00:22:13 +01:00
Jakub Zych
97d7ee0586 feat(32.2-01): admin consent endpoint for administrator-only MCP grants
- pact: MCPAdminConsent provider interface, MCPAdminConsentRequest,
  MCPAdminConsentDecision, ErrMCPConsentNotFound, ErrMCPConsentNoScopes
- cabana: GET/POST {api}/mcp/consent/{request}, interactive-only, scope
  policy of personal tokens (requested, catalog, owned; * collapses)
- cabana: TokenScopeNames and TokenScopeLabels export the token-scope catalog
- swag views and annotations; admin.json and schema.d.ts regenerated so the
  contract and conformance inventories stay green
- phrasebook keys mcp_connect.request_not_found and no_grantable_scopes
2026-11-21 00:14:43 +01:00
Jakub Zych
c63bfa3ef2 feat(32.2-01): administrator-only MCP grants and a configurable consent handoff
- pact: MCPGrant.Subject with MCPGrantSubjectBackend, MCPSubject.ScopeLimited
- pier: a backend-subject grant resolves straight to a scope-limited backend
  subject bound to oauth:backend:<client>:<admin>, no link lookup, no ceiling
- pier: the backend guard scope-limits ScopeLimited subjects like g15_ tokens
- wristband: Options.ConsentPath and Options.DefaultScopes; defaults unchanged
- smoke tests TestBackendSubjectSmoke (Postgres) and TestConsentPathSmoke
2026-11-21 00:06:19 +01:00
Jakub Zych
1e56d750ef docs(lighthouse,postcard,signpost): compile README Go examples via src= (quick-261118-qsd) 2026-11-18 20:13:14 +01:00
Jakub Zych
a2551d83d7 docs(pact,party,surf): compile README Go examples via src= (quick-261118-qsd) 2026-11-18 20:07:39 +01:00
Jakub Zych
cd55a3980d docs(pier,seaglass,sunrise,sunscreen,tide): compile README Go examples via src= (quick-261118-qsd) 2026-11-18 20:04:47 +01:00
Jakub Zych
6409837b0c docs(phrasebook,sieve,towel,wire,wristband): compile README Go examples via src= (quick-261118-qsd) 2026-11-18 20:01:05 +01:00
Jakub Zych
c517db564c docs(flare,kiosk,lagoon): compile README Go examples via src= (quick-261118-qsd)
- flare: send region run by TestDocsNotifyReply against a loopback TLS push
  service; blogSubscriptions and the publish-source region run by
  TestDocsSubscriptionSource on a Postgres container (skips under -short)
- kiosk: write, newest and client regions run by TestDocsWriteManifest (a
  copy of the literal fixture), ExampleVersionsResponse and
  TestDocsBlogReleases (httptest registry); the CheckT fence reuses
  TestPluginManifest
- lagoon: new open region run by TestDocsOpenFromApp (DocsDSN added to
  export_docs_test.go); the model, create-post, on-database, publish and
  migrations fences reuse the Database pages' targets
2026-11-18 19:53:27 +01:00
Jakub Zych
d04454c57b docs(cooler,diary,festival,fetchguard): compile README Go examples via src= (quick-261118-qsd)
- cooler: ExampleFromApp and the articlesController purge declarations;
  AllowExport run by TestDocsAllowExport on miniredis
- diary: blogLog and ExampleFor; the generated main's run function, run by
  TestDocsRun in a temp directory with diary.Reset on cleanup
- festival: PostPublished/ExampleBus_Fire and PostFormExtended/Collected/
  ExampleBus_Collect, with a TestDocsDeclarations for Collected
- fetchguard: fetch region run by TestDocsFetchImage (loopback refused as
  private_ip), client region run by TestDocsSyncItems on a stub transport
2026-11-18 19:48:01 +01:00
Jakub Zych
becb31fbef docs(cabana,compass,conga): compile README Go examples via src= (quick-261118-qsd)
- cabana: the hand-written controller fence points at Post, PostsController
  and BlogPlugin declarations; TestDocsDeclarations now calls each of them
- compass: mailSettings and ExampleOpen; the YAML block matches the
  directory ExampleOpen writes
- conga: job, dispatch and progress fences reuse the Jobs page targets; new
  reindex and worker regions run in TestDocsDispatch (Docker), and the
  schedule fence is FeedPlugin.Schedule, checked by TestDocsSchedule
2026-11-18 19:44:21 +01:00
Jakub Zych
a0f5b5e561 docs(backpack,beachcomber,boardwalk,bonfire,bouncer): compile README Go examples via src= (quick-261118-qsd)
- backpack: Greeter and ExampleApp_Publish replace the whole-file fence
- beachcomber: Post's Searchable methods plus a new SearchIndexSchema, a
  Plugin.Boot that installs the gate, and the existing gate/search regions
- boardwalk: new example_test.go; the mount region runs in ExampleHandler
- bonfire: importPostsCommand and acmeMain (the binary's main as a function
  returning the exit code), run by ExampleExecute; ExampleCatalog_Has
- bouncer: users/FindByID and ExampleNewJWTGuard; RefreshRoute run by
  TestDocsRefreshRoute on a production compass config
2026-11-18 19:39:50 +01:00
Jakub Zych
48527e4206 docs(breakwater): compile README Go examples via src= (quick-261118-qsd)
- the Usage fence becomes two src= references to ExampleRender and
  ExamplePurify, filled by summer docs:sync
- the Phase 11.1 SC4 acceptance scan now allows top-level src= fences
  in module READMEs (nested ones are still refused) and expects the
  api/<name> pages to caption them like docs/ pages
2026-11-18 19:32:11 +01:00
Jakub Zych
830f305376 style: gofmt cabana mail routes and postcard store test 2026-11-18 18:42:59 +01:00
Jakub Zych
38f7f3a777 feat(surf): AssembleRouter builds the router and handler once; the router stops the MCP endpoint it mounted (quick-261118-lbt)
- surf.AssembleRouter returns the router and the compiled handler from
  one build, so an mcp.enabled app is not built twice; Assemble keeps
  its signature and is implemented on top of it
- serve uses AssembleRouter with a deferred Router.Close
- pier.Pier.Close stops the session reaper and the Redis warm-up; the
  router that mounted the endpoint owns it
- ExampleAssembleRouter, routing/testing docs and the surf/pier READMEs
2026-11-18 15:44:56 +01:00
Jakub Zych
d9e21ad019 fix(surf): close the rate-limit store a router created (quick-261118-lbt)
- MemoryStore.Close stops the sweep goroutine; Attempt keeps working
- Router.Close runs what the router owns (the fallback MemoryStore of
  BuildRouter), never a store published on the app
- BuildRouter closes the router on every error return
- serve closes its router and installCooler's fallback store on exit;
  route:list closes its router
- README and rate-limiting docs describe the ownership
2026-11-18 15:41:05 +01:00
Jakub Zych
ea1befdd6c feat(party): give every application its own plugin instances (quick-261118-lbt)
- Register keeps a pristine shallow copy of each pointer-to-struct plugin;
  every Activate hands its application a fresh copy, so a second
  application no longer rebinds the first one's plugins
- value plugins and pointers to non-struct types are used as is
- party.RegisterFactory for plugins whose init builds maps or pointers
- activate() and its tests are unchanged
- README and plugin/lifecycle docs describe the per-application rule
2026-11-18 15:37:06 +01:00
Jakub Zych
b8487b028b test(quick-261115-cha): cover cross-plugin mail layouts through overrides, the editor and the index
- TestCrossPluginLayoutOverride: a template override naming the lender's
  layout, a customized lender layout, Editor Validate and Preview
- TestCrossPluginLayoutSync (Docker): SyncIndex points the borrower rows'
  layout_id at the lender's layout row and keeps it on a second run
2026-11-15 09:09:58 +01:00
Jakub Zych
1fb4254291 feat(quick-261115-cha): let a mail template use another plugin's layout by full code
- resolveLayoutLocked: after the plugin's own alias and the built-in
  aliases, a full layout name already in the catalog resolves to itself;
  an unregistered full name fails with a require-the-owner hint
- another plugin's short alias and the short-alias error are unchanged
- TestCrossPluginLayout covers register, send, errors and precedence
- postcard README and docs/services/mail.md describe the rule
2026-11-15 09:08:21 +01:00
Jakub Zych
f1f284a0f9 test(quick-261114-p5m): pin end tags inside quoted attributes in the mail URL check
- refuse cases for all eight probe payloads (noscript href and handler,
  svg style, title and textarea, noembed, xmp, conditional comment)
- send fallback and editor refusal for the three that survive rendering
- escaped_send subtests check svg title/textarea sends with an x/net/html
  parser oracle, scripting on and off
- accept cases for conditional comments, quoted CSS, a safe noscript
  link and a literal comment opener in an attribute
2026-11-14 18:37:08 +01:00
Jakub Zych
d6ac0aeb4b fix(quick-261114-p5m): read tags across raw-text and comment ends in the mail URL check
- unsafeMarkupAt runs the existing HTML reading, then a tag reading in
  which attribute quoting alone decides where a tag ends
  (NextIsNotRawText after raw-text start tags, comment openers blanked)
- both readings share unsafeAttrs; existing refusals keep their message
  and snippet
- svg/style end tag inside a quoted attribute is refused at check, save
  and send; README and docs/services/mail.md describe the second reading
2026-11-14 18:25:13 +01:00
Jakub Zych
8deb56ff0b fix(35): WR-03 treat data: in a site name as a data URL only with ; or ,
scriptURLText took data: followed by any non-space character as a data
URL, so names such as Data:Lab, Big Data:Summit and data:Science were
refused on the Branding form and dropped from mail, contrary to the docs.
A data URL now needs its optional MIME type and the ; or , every data URL
has. javascript: and vbscript: keep matching with whitespace after the
colon, since such a URL still runs.
2026-11-14 17:40:13 +01:00
Jakub Zych
31de2ff90f fix(35): WR-02 drop the whole-document event-handler regex
validateHTML ran (?i)\son[a-z]+\s*= over the rendered document, text
included, so a variable such as "buy one = get one free" stopped its own
message, and it is what made Online=Shop in the footer a send failure.
The tokenizer walk refuses every on* attribute, and since CR-02 it also
reads raw-text element and comment content as markup, so the regex is
dropped. Text shaped like a handler is now sent; such site names are shown
and saved, and the Branding refusal copy no longer mentions onclick=.
2026-11-14 17:37:52 +01:00
Jakub Zych
baba524caf fix(35): WR-01 strip whitespace before the list, meta, CSS and comment scheme checks
Single-URL attributes removed ASCII whitespace and control characters
before looking for a scheme, the list-valued, meta content, style and
comment checks did not, so values="java&#9;script:..." and a tab-split
meta refresh passed. The stripping is factored out as stripURLSpace and
used by every scheme check.
2026-11-14 17:32:14 +01:00
Jakub Zych
1d481bb02d fix(35): CR-02 check raw-text element and comment content as markup
The tokenizer-only walk read noscript, title, textarea, style, xmp and the
other raw-text elements as one text token and never looked inside, so an
unencoded javascript: link in <noscript> or <svg><title> passed the check
and was sent. A mail client renders with scripting off and parses svg
children as markup, so the raw content of those elements, and comment
data (Outlook conditional comments), is now checked again as markup;
nesting deeper than eight levels is refused.
2026-11-14 17:30:07 +01:00
Jakub Zych
2dbee30530 fix(35): CR-01 check the site name where the layouts print it
UnsafeText checked the escaped name on its own, so a name starting with
on<letters>= (Online=Shop, onboarding=team) passed, was saved, and then
failed every default/system-layout send once the footer printed it after
"© <year> ". The name is now checked in the footer, header span and alt
contexts, so such a name is dropped at render and refused on the Branding
form instead of stopping mail.
2026-11-14 17:25:53 +01:00
Jakub Zych
54617f78d1 test(cabana): unsafe Branding site names refused at save, stored ones never block saves or sends
- TestMailSiteNameSafety: a javascript: site name is a 422 on site_name in en
  and pl and stores nothing; Big Data: Summit and Metadata: Weekly save; the
  Branding preview drops an unsafe draft name; a name stored before the check
  never refuses a template or layout save or stops a send; a mail.from display
  name with a colon shows on the default and system layouts
- the mail screens env reads mail.from from its configuration (default
  unchanged), so a mutate hook can set the sender
- check-phase35.sh DOCKER_TESTS requires TestMailSiteNameSafety
2026-11-14 15:56:18 +01:00
Jakub Zych
446a77efbf test(postcard): decoded URL scheme check, unsafe inlined output and the literal footer
- TestURLSchemeCheck: prose and scheme words in titles or queries pass; every
  URL-bearing attribute, CSS, meta refresh and each entity-encoded or
  whitespace-split script URL is refused with a snippet at the markup; a layout
  override with javascript&#58; falls back to the file version with inlining on
  and off; the editor refuses it on content_html and CSS URLs on content_css
- TestInlineUnsafeOutput: a failing inlined result sends the style-block
  version with one warning per layout
- TestFooterSiteNameLiteral: the footer prints the site name escaped and
  literally on the default and system layouts; body stays Markdown
- check-phase35.sh GO_TESTS requires the three tests
2026-11-14 15:47:35 +01:00
Jakub Zych
e0016e0c0d test(postcard): site names on the built-in layouts never stop a send
- TestSiteNameSend: mail.from "Metadata: Weekly" and Branding "Big Data: Summit"
  show in header, footer and text on the default and system layouts, on the
  file-version, override and override-failure fallback paths
- TestUnsafeSiteNameDropped: unsafe names are left out on every path with one
  value-free warning per source; editor saves and previews are not refused
- TestUnsafeText pins the safe and unsafe texts
- check-phase35.sh GO_TESTS requires them and TestMailSafetySmoke
2026-11-14 15:40:57 +01:00
Jakub Zych
15d3e6fb8d fix(postcard): print the site name literally in the built-in layouts' footer
- the footer partial gains a text argument, printed as a paragraph
  through html/template and verbatim in the text part; body stays
  Markdown for callers that pass Markdown on purpose
- the default and system layouts pass the copyright line as text, so
  *Acme*, Acme <Studio> and [x](url) appear as typed, as in the header
  (WR-01)
- README partial table, layouts and Branding paragraphs; docs partials
  table and built-in layouts paragraph
- TestMailSafetySmoke/literal_footer
2026-11-14 15:29:57 +01:00
Jakub Zych
cd91cf2e64 fix(postcard): an inlined result that fails the safety check sends the style block
- inlineHTML treats a failing post-inline check like an inliner error:
  the un-inlined HTML, which already passed validateHTML, is sent with
  its style block and the rate-limited inline:<layout> warning
- mail is never stopped by the inliner, as the docs promise (WR-05)
- README and docs/services/mail.md describe the check before inlining
- TestMailSafetySmoke/inline_unsafe_output
2026-11-14 15:25:03 +01:00
Jakub Zych
3a725469c6 fix(postcard,cabana): unsafe site names never stop a send and are refused at save
- postcard.UnsafeText: a text a layout prints is unsafe when, escaped,
  it fails the rendered-HTML checks or holds a script or data URL at a
  scheme boundary ("Big Data: Summit" is safe)
- siteNameFrom/layoutSiteName: an unsafe Branding name falls back to the
  mail.from display name, an unsafe one of those gives no name; one
  rate-limited warning per source (site_name:branding, site_name:mail.from),
  never the value; file version, override, fallback and editor alike
- the Branding preview of an unsafe draft name renders without it
- MailBrandSetting.BeforeValidate: 422 on site_name with
  backend::lang.mail.brand.site_name_unsafe (en/pl)
- settings Put localizes a BeforeValidate refusal's phrase keys, as a
  controller save does
- TestMailSafetySmoke/unsafe_site_name, TestMailBrandSiteName/unsafe_name_refused
2026-11-14 15:20:29 +01:00
Jakub Zych
13ab905f8d fix(postcard): check URL schemes in decoded attribute values, not in text
- validateHTML keeps the raw tag and handler regexes and reads the rest
  through unsafeMarkup: x/net/html tokenizer, decoded attribute values,
  prefix check on URL attributes, whole-value check on CSS, list
  attributes, meta content and comments; any on* attribute is refused
- text is not a URL: "Metadata: Weekly" or "Big Data: Summit" as a site
  name or body text no longer stops a send (CR-01)
- entity-encoded javascript&#58; is refused whether or not the layout
  opts out of inlining (WR-05)
- draft layout CSS is checked as a style element
- fixtures that pinned prose as unsafe now carry markup-level URLs;
  the 35-07 subtest pinning an unsafe stored name is removed
- TestMailSafetySmoke prose_site_name and encoded_scheme
2026-11-14 15:13:35 +01:00
Jakub Zych
eed91c821a test(cabana): grouped mail templates, site name and the inlining switch
- TestMailLocaleGroups: one list row per template, customized locales,
  grouped badges and status filter, localeVariants order, labels, states and
  current flag, the default version on a fallback row, save then send, reset,
  drift through the base file, the file version against the base file,
  out-of-group ids, the permission split and locales enabled at run time
- TestMailBrandSiteName: saved trimmed, 255-character limit, preview and send
  header, no header row without a name or a logo, current handling of a name
  holding a URL scheme
- TestMailLayoutInlineOptOut: the switch on a file layout, reset to the file
  value, a custom layout created with the switch off
- check-phase35.sh requires the three names (DOCKER_TESTS)
2026-11-13 21:38:30 +01:00
Jakub Zych
a0dde086d2 test(postcard): locale fallback, built-in layouts, partials and CSS inlining
- TestTemplateBase, TestTemplateFor and TestSendLocaleFallback pin the
  <template>-<locale> resolution and the order the override source is asked
- TestEnsureLocaleRows (Postgres): rows only for non-default locales without
  files, idempotent, customized content kept while file_hash follows the
  base, base_code from SyncIndex, reset of a fallback row, migrations roll back
- TestBuiltinLayoutsLogo, TestHeaderFooterPartials, TestButtonPartial and
  TestSiteName cover the finished default, system and minimal layouts
- TestInlineCSS, TestInlineCSSOptOut and TestInlineFailure cover inlining,
  the per-layout opt-out and the fallback when the inliner fails
- check-phase35.sh requires the new names (GO_TESTS, DOCKER_TESTS)
2026-11-13 21:31:44 +01:00
Jakub Zych
09a5338d9a feat(postcard): header, logo, footer and padding in the system and minimal layouts
- system.htm: the header partial (logo or site name) above the card and
  the copyright footer below it; its text wrapper ends with the footer
- brand CSS: the system layout's content cell keeps WinterCMS's 35px
  side padding (the 35px 0 override is gone)
- minimal.htm: the logo above the message when logoUrl is set
- TestMailPartialsSmoke/built_in_layouts covers the three layouts and the
  inlined brand colour on the button in each
- 35-06 Task 3 (G-35-8)
2026-11-13 21:17:02 +01:00
Jakub Zych
d320733510 feat(postcard): inline mail CSS at render with a per-layout opt-out
- github.com/vanng822/go-premailer v1.38.0 (default options) inlines the
  rendered HTML after the safety checks; the result is checked again,
  HTML without a style element is left as it is, an inliner error sends
  the style block only and warns (key inline:<layout>)
- opt-out: layout header key disable_auto_inline_css, the layouts column
  of the same name (migration 202611130003), LayoutFile/LayoutOverride/
  Draft.DisableAutoInlineCSS; SyncIndex mirrors and ResetOverride restores
  the file's value
- cabana layout form switch on the CSS tab, mapped into the layout draft
  and the save validation; en/pl copy
- tests: TestMailPartialsSmoke/inline, TestMailEditorSmoke/inline_flag,
  the layouts switch in TestMailScreensSmoke; CSS-slot tests read the
  style block through a no-op inliner
- 35-06 Task 2 (G-35-8)
2026-11-13 21:12:01 +01:00
Jakub Zych
093529d45c feat(postcard): finished default layout with logo header, footer and site name
- default.htm ports WinterCMS's default layout: wrapper, header row with
  the Branding logo (or the site name), the inner-body card and a
  copyright footer; its text wrapper ends with the footer
- built-in header and footer partials (logo/body/url, body)
- layouts get siteName (Branding site name, else the display name of
  mail.from) and year; Brand.SiteName and migration
  202611130002_mail_brand_site_name
- cabana Branding form gets site_name (trimmed, max 255), mapped into the
  Branding preview draft; en/pl copy; img.logo brand CSS
- 35-06 Task 1 (G-35-8)
2026-11-13 20:52:52 +01:00
Jakub Zych
e114492bbe build(admin): rebuild the embedded admin for the mail locale switcher 2026-11-13 20:40:18 +01:00