Read-only mode is a setting an admin can enable to prevent writes to
the database. This can be used when the site is under maintenence or
being upgraded. The previous commit added the siteconfig attribute and
a checkbox to toggle the mode. This commit adds a new 503 error to
Review Board's webapi. Furthermore, all requests that hit RB's API
using PUT
, POST
, DELETE
methods while read-only mode is on, and
the user is not a superuser, will return the new 503 error. A utility
file read_only.py
has been added which deals with the logic and
caching of determining when a user should be affected by read-only
mode.