Giter Site home page Giter Site logo

backdrop-contrib / readonlymode Goto Github PK

View Code? Open in Web Editor NEW
2.0 9.0 1.0 40 KB

Lock your Backdrop CMS site config and content so maintenance and deployments can happen without taking the site offline.

Home Page: https://backdropcms.org/project/readonlymode

License: GNU General Public License v2.0

PHP 100.00%
backdrop backdropcms deployment maintenance readonly uptime cms

readonlymode's Introduction

Read Only Mode

Read Only Mode allows site administrators and developers to lock down or freeze a production server so that maintenance or large deployments can occur without taking the site offline.

In a typical example, Read Only Mode is activated on the production server, the database is copied to a development server where work is done, and then the database is pushed back to the production server and Read Only Mode disabled.

Read Only Mode can be checked, enabled or disabled using the user interface, bee or drush.

Differences from Drupal 7

  • Uses 'state' and 'config' rather than 'variables'.
  • Form IDs updated in allow/view only lists to reflect Backdrop equivalents.
  • Dedicated Bee command added to simply operations.
  • Drush command uses state-set and state-get rather than variable-set and variable-get.
  • Includes patch from Issue 2458051 to fix issue with View Only forms.
  • Includes an API for other modules to modify the default form lists.

Installation

Usage

Enable and disable Read Only Mode using the "Read only mode" checkbox at Administration > Configuration > Development > Maintenance mode (admin/config/development/maintenance).

On this page, it is also possible to:

  • Customize the messages that are shown to users when Read Only Mode is enabled.
  • Redirect users to a specific page instead of showing messages.
  • Define additional forms that are allowed using the form id.
  • Define additional forms that can be accessed as view only forms.

You may want to allow other forms if the form does not write to the Backdrop database, but instead sends the form content to a different web service or by email.

You may want to allow other forms to be viewed but not changed so users can check details but not make changes.

The module provides a permission that overrides access restrictions and can be given to administrators; user 1 can access all forms regardless of the permission.

Bee support

This module adds a dedicated bee command to enable, disable and check status of Read Only Mode. It can be used with bee readonlymode, bee ro or bee rom.

The command will treat 1, true, TRUE as TRUE and 0, false, FALSE as FALSE.

  • Check the status: bee readonlymode
  • Turn on Read Only Mode: bee readonlymode 1
  • Turn off Read Only Mode: bee readonlymode 0

Drush support

As Read Only Mode is defined by a single state, it is easy to use Drush to enable and disable the mode. Drush aliases sget and sset will also work here.

  • Check the status: drush state-get site_readonly
  • Turn on Read Only Mode: drush state-set site_readonly 1
  • Turn off Read Only Mode: drush state-set site_readonly 0

API support

The module has an API to support modification of the lists of allowed forms and view only forms by other contrib and custom modules. See readonlymode.api.php for more details.

Issues

Bugs and Feature Requests should be reported in the Issue Queue: https://github.com/backdrop-contrib/readonlymode/issues.

Current Maintainers

Credits

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.

readonlymode's People

Contributors

andrewbelcher avatar barisw avatar sharique avatar yorkshire-pudding avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.