M1 (9): dashboard alerts by role

IntegrationAlerts reads the admin-only Site integrations global with access
control off and showed its error texts to everyone who opened the dashboard.
Now: an admin sees what is failing and the link, an editor a neutral "an
integration needs attention — ask an administrator", anyone else nothing.
CookieCrawlAlert is shown to editors and above (the role that may read the crawl
result). Both use userMeetsRole, so a session that still owes its second factor
sees neither. dashboardAlerts: { integrations: 'admin' | 'editor' | 'all',
cookies: 'editor' | 'all' } loosens it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 00:39:12 +01:00
co-authored by Claude Fable 5.2
parent 5d35b2c3f4
commit 0b4c4e8295
7 changed files with 173 additions and 13 deletions
@@ -4,6 +4,7 @@ import { defineTexts } from '../define.js'
export const integrationsTexts = defineTexts({
en: {
// Dashboard alert (IntegrationAlerts)
alertsAskAdmin: 'Ask an administrator to look at it.',
alertsHeading: 'An integration needs attention. The site still works.',
alertsLink: 'Go to Site integrations',
alertsUnknownError: 'Unknown error.',
@@ -62,6 +63,7 @@ export const integrationsTexts = defineTexts({
testEmailWithFile: 'Attach a 10 MB test file',
},
pl: {
alertsAskAdmin: 'Poproś administratora, aby to sprawdził.',
alertsHeading: 'Integracja wymaga uwagi. Witryna nadal działa.',
alertsLink: 'Przejdź do integracji',
alertsUnknownError: 'Nieznany błąd.',