Full Read Only Notifier icon
Module Id
full-read-only-notifier
Group Id
org.jahia.community
Updated
Requires Jahia
8.2.1.0
Author
Florent BOURASSE
Category
Admin Features
Status
COMMUNITY info

Full Read Only Notifier group_work

This (very) simple module displays once a notification when a Jahia instance is in full read-only mode and when it leaves this mode.

Dependencies & Dependants

Changelog 2.0.4

Site-administration panel now works for site administrators (not just root), and the menu loads correctly against richtext-ckeditor5 1.0.1.

Fixes ("menu not displayed / Permission denied")

  • Menu now loads with richtext-ckeditor5 1.0.1 — the admin UI consumes the CKEditor5 Module Federation remote under the correct global name appShell.remotes.richtextCkeditor5. The previous name (…ckeditor5) failed to resolve, so the remote never loaded, init.js threw, and the site-administration route was never registered.
  • Site-scoped permission enforcement — the GraphQL settings query and updateSettings mutation now check the siteAdminFullReadOnlyNotifier permission on the target site node (/sites/<siteKey>) using the current user's session, instead of the DXM @GraphQLRequiresPermission annotation, which evaluated against the repository root and therefore denied every non-root administrator (GqlAccessDeniedException). The permission is nested under site-admin, so the built-in site-administrator role grants it via permission-tree inheritance — no role provisioning required. The frontend route permission was aligned to match.

Security

  • Stored XSS in the notifier view closed via server-side render-time sanitization (#20#19).
  • Restricted the CKEditor GeneralHtmlSupport allowlist and enabled iframe sandboxing.
  • JCR HTML sanitized before DOM injection in the JSP; jsoup-based allowlist applied on write and render.
  • Added unit tests for the siteKey validation security boundary.

Other changes

  • Fixed view JSP rendering by importing org.jahia.taglibs.jcr.node (bnd does not scan JSPs) (#18).
  • Grouped GraphQL operations under a single fullReadOnlyNotifier namespace container (#17).
  • Added missing French (i18n) translation keys.
  • Dependency bumps: tar (#15), @babel/core (#16), and test-scope qsuuidtmp.

Tests

  • Java unit tests for the permission checker and existing extensions (35 passing).
  • Cypress e2e regression for the permission scope: a non-root site administrator can read/update/see the panel, while a user without the role is denied.

Compatibility

  • Requires Jahia 8.2.1.0+ and the richtext-ckeditor5 module (verified against 1.0.1).

How To Install

Download the jar and deploy it on your instance then activate the module on the site you wish to use. Once it's done, drag the component "Full Read Only Notifier" to your page, ideally in an "absolute" area so this component will be accessible on all your pages. 

Message when enabling/disabling the FRO can be configured in the site settings.

License

MIT License

Copyright (c) 2018 - present Florent BOURASSÉ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.