Problem/Motivation

When taking a site into read-only-mode, we wish to not show external visitors any notice. Seems to be impossible to achive with current code

Steps to reproduce

Proposed resolution

Added a permission "Suppress all Read Only Mode notices and warnings". When set, none of the warnings or notices will be displayed from readonlymode-module.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Andreas Hansson created an issue. See original summary.

Andreas Hansson’s picture

Andreas Hansson’s picture

Patch for latest version

solideogloria’s picture

Version: 8.x-1.0 » 8.x-1.x-dev
Status: Needs review » Needs work

It would make more sense to have a "view read only mode messages" permission. Otherwise, you cannot let admins see the messages without also letting anonymous users see them (if you suppress messages for anonymous, they are suppressed for all users).

astonvictor made their first commit to this issue’s fork.

astonvictor’s picture

Status: Needs work » Needs review

Created a new 'readonlymode access messages' permission to access messages.
Implemented an update function to grant permission to all roles by default.

astonvictor’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.