diff options
-rw-r--r-- | conf/general.yml-example | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Offline.pm | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/conf/general.yml-example b/conf/general.yml-example index d205061ef..79af1c78e 100644 --- a/conf/general.yml-example +++ b/conf/general.yml-example @@ -48,9 +48,12 @@ STAGING_SITE: 1 # this to 1 if you want a staging site to route reports as normal. # - skip_checks: Manual testing of multiple cobrands can be made easier by # skipping some checks they have in them, if this variable is set. +# - enable_appcache: Whether the appcache should be active. NB: Only affects +# superuser sessions. STAGING_FLAGS: send_reports: 0 skip_checks: 0 + enable_appcache: 0 # What to use as front page/alert example places placeholder # Defaults to High Street, Main Street diff --git a/perllib/FixMyStreet/App/Controller/Offline.pm b/perllib/FixMyStreet/App/Controller/Offline.pm index 7b17bb569..d50d0d03f 100644 --- a/perllib/FixMyStreet/App/Controller/Offline.pm +++ b/perllib/FixMyStreet/App/Controller/Offline.pm @@ -18,7 +18,8 @@ Offline pages Catalyst Controller. sub have_appcache : Private { my ($self, $c) = @_; - return $c->user_exists && $c->user->has_body_permission_to('planned_reports'); + return $c->user_exists && $c->user->has_body_permission_to('planned_reports') + && !($c->user->is_superuser && FixMyStreet->staging_flag('enable_appcache', 0)); } sub manifest : Path("/offline/appcache.manifest") { |