FEATURE: Allow safe mode to be disabled

This commit is contained in:
Robin Ward
2018-04-23 14:50:52 -04:00
parent b449c47bdd
commit fd14ee4797
6 changed files with 25 additions and 2 deletions

View File

@ -1,5 +1,7 @@
class SafeModeController < ApplicationController
layout 'no_ember'
before_action :ensure_safe_mode_enabled
skip_before_action :preload_json, :check_xhr
def index
@ -18,4 +20,11 @@ class SafeModeController < ApplicationController
redirect_to safe_mode_path
end
end
protected
def ensure_safe_mode_enabled
raise Discourse::NotFound unless SiteSetting.enable_safe_mode?
end
end