read_only_mode
This module allows site administrators to enable a **read-only mode** where non-admin
users are prevented from submitting any forms or performing any POST requests on
the site. It is useful for maintenance windows, content freezes, or other situations
where the site content should not be modified temporarily.
When enabled
:
- All POST requests from non-admin users are blocked.
- A warning message is shown.
- Users are redirected back to the previous page with the notice.
Administrators with the **administer site configuration** permission
are exempt and can continue to submit forms.
---
## Features
- Toggle read-only mode via a simple admin configuration form.
- Blocks all POST requests from non-admin users.
- Shows a warning message when blocking form submissions.
- Redirects users back to the referring page instead of showing an error page.