diff options
-rw-r--r-- | conf/general.yml-example | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Offline.pm | 4 | ||||
-rw-r--r-- | templates/web/base/common_scripts.html | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/conf/general.yml-example b/conf/general.yml-example index 72b5fbaa3..d205061ef 100644 --- a/conf/general.yml-example +++ b/conf/general.yml-example @@ -48,11 +48,9 @@ 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. 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 dceccc81f..7b17bb569 100644 --- a/perllib/FixMyStreet/App/Controller/Offline.pm +++ b/perllib/FixMyStreet/App/Controller/Offline.pm @@ -11,7 +11,6 @@ FixMyStreet::App::Controller::Offline - Catalyst Controller =head1 DESCRIPTION Offline pages Catalyst Controller. -On staging site, appcache only for people who want it. =head1 METHODS @@ -19,8 +18,7 @@ On staging site, appcache only for people who want it. sub have_appcache : Private { my ($self, $c) = @_; - return $c->user_exists && $c->user->has_body_permission_to('planned_reports') - && !FixMyStreet->staging_flag('enable_appcache', 0); + return $c->user_exists && $c->user->has_body_permission_to('planned_reports'); } sub manifest : Path("/offline/appcache.manifest") { diff --git a/templates/web/base/common_scripts.html b/templates/web/base/common_scripts.html index 057ecfd67..82f33569d 100644 --- a/templates/web/base/common_scripts.html +++ b/templates/web/base/common_scripts.html @@ -19,6 +19,11 @@ IF c.user_exists AND (c.user.from_body OR c.user.is_superuser); scripts.push( version('/cobrands/fixmystreet/staff.js') ); + IF c.user.has_body_permission_to('planned_reports'); + scripts.push( + version('/cobrands/fixmystreet/offline.js'), + ); + END; END; FOR script IN map_js; @@ -27,7 +32,6 @@ END; scripts.push( version('/cobrands/fixmystreet/map.js'), - version('/cobrands/fixmystreet/offline.js'), ); IF admin; |