etherpad-lite/src/node/utils
John McLear b751fd7b9e
feat(settings): enable Pad-wide Settings by default; fix misleading modal title (#7679)
* feat(settings): enable Pad-wide Settings by default; fix misleading modal title

The creator-owned Pad-wide Settings feature (#7545) shipped behind a flag that
defaulted to false. With the flag off the modal still rendered an H1 of
`pad.settings.padSettings` ("Pad-wide Settings") for *every* user, even though
no pad-wide controls were ever shown. Two readers in different browsers both
saw "Pad-wide Settings" as the modal title, which looked like a creator-gate
regression but was just a copy bug.

Two changes:

1. Flip the default of `enablePadWideSettings` to `true` (Settings.ts plus
   both settings templates). With the feature on, the creator (revision-0
   author) gets a real "Pad-wide Settings" section gated by
   `clientVars.canEditPadSettings`, while every other user sees only "User
   Settings" — matching the design intent of #7545. This is a behavior change,
   so the settings comments are expanded to describe what the toggle now does.

2. Drop the conditional H1 in `src/templates/pad.html` and always use
   `pad.settings.title` ("Settings"). Operators who explicitly disable the
   feature shouldn't see a label that lies about a section that isn't
   rendered.

Adds backend regression coverage in `tests/backend/specs/socketio.ts`:
- Different browsers (different cookie jars => different authorIDs): only the
  first joiner gets `canEditPadSettings: true`.
- Same browser, two tabs (shared HttpOnly token cookie => same authorID):
  both connections are the same identity, both correctly land on the creator
  path.

* test(settings): regression coverage for the settings modal H1

Asserts the rendered `/p/<id>` HTML always uses
`data-l10n-id="pad.settings.title"` for the modal heading, regardless of
`enablePadWideSettings`. Catches a re-introduction of the old conditional
that printed "Pad-wide Settings" for every user when the feature was off.

Action of Qodo review feedback on PR #7679.
2026-05-07 10:01:04 +01:00
..
AbsolutePaths.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
anonymizeIp.ts feat(gdpr): IP/privacy audit (PR2 of #6701) (#7547) 2026-05-01 13:47:40 +01:00
checkValidRev.ts Added typescript to etherpad 2024-02-05 21:13:02 +01:00
Cleanup.ts chore: moved first files to esm (#7061) 2025-08-04 19:59:28 +02:00
Cli.ts chore: use args from cmd (#7112) 2025-09-03 21:01:20 +02:00
customError.ts Added typescript to etherpad 2024-02-05 21:13:02 +01:00
ensureAuthorTokenCookie.ts feat(gdpr): HttpOnly author-token cookie (PR3 of #6701) (#7548) 2026-05-03 05:56:56 +01:00
ExportEtherpad.ts fix(export): /export/etherpad honors the :rev URL segment (#7566) 2026-04-26 10:29:02 +02:00
ExportHelper.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
ExportHtml.ts fix(editor): preserve U+00A0 non-breaking space (#3037) (#7585) 2026-04-23 08:57:30 +01:00
ExportTxt.ts feat!: replace Abiword with LibreOffice and add DOCX export (#7539) 2026-04-19 09:08:22 +01:00
ImportEtherpad.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
ImportHtml.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
LibreOffice.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
Minify.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
MinifyWorker.ts Feat/frontend vitest (#6469) 2024-08-16 22:55:42 +02:00
NodeVersion.ts chore: moved first files to esm (#7061) 2025-08-04 19:59:28 +02:00
padDiff.ts fix: createDiffHTML API fails with "Not a changeset: undefined" (#7445) 2026-04-04 08:25:26 +01:00
path_exists.ts Moved path_exists and promises to es6 2024-08-18 19:52:21 +02:00
promises.ts Moved path_exists and promises to es6 2024-08-18 19:52:21 +02:00
randomstring.ts chore: moved first files to esm (#7061) 2025-08-04 19:59:28 +02:00
run_cmd.ts feat(packaging): add Debian (.deb) build via nfpm with systemd unit (v2) (#7583) 2026-04-27 10:33:30 +01:00
sanitizePathname.ts Feat/frontend vitest (#6469) 2024-08-16 22:55:42 +02:00
Settings.ts feat(settings): enable Pad-wide Settings by default; fix misleading modal title (#7679) 2026-05-07 10:01:04 +01:00
SettingsTree.ts Enforce 2-space indentation across codebase (#7426) 2026-04-01 19:48:45 +01:00
SkinColors.ts feat(pad): add theme-color meta to match toolbar on mobile (#7606) (#7636) 2026-05-01 10:25:24 +01:00
socialMeta.ts feat: Open Graph & Twitter Card metadata for pad/timeslider/home (closes #7599) (#7635) 2026-05-01 10:43:29 +01:00
Stream.ts Added typescript to etherpad 2024-02-05 21:13:02 +01:00
tar.json Changeset: New API to simplify attribute processing 2021-11-21 04:11:41 -05:00
toolbar.ts Fix ESM/CJS interop for Settings module breaking plugin compatibility (#7421) 2026-04-01 11:39:40 +01:00
UpdateCheck.ts chore: removed axios (#7685) 2026-05-06 22:06:04 +02:00