mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 05:52:49 +08:00
correct environment handling for test mode
This commit is contained in:
parent
873a07a625
commit
ed2e62f845
|
@ -250,9 +250,9 @@ class ApplicationController < ActionController::Base
|
|||
def resolve_safe_mode
|
||||
safe_mode = params[SAFE_MODE]
|
||||
if safe_mode
|
||||
request.env[NO_CUSTOM] = true if safe_mode.include?(NO_CUSTOM)
|
||||
request.env[NO_PLUGINS] = true if safe_mode.include?(NO_PLUGINS)
|
||||
request.env[ONLY_OFFICIAL] = true if safe_mode.include?(ONLY_OFFICIAL)
|
||||
request.env[NO_CUSTOM] = !!safe_mode.include?(NO_CUSTOM)
|
||||
request.env[NO_PLUGINS] = !!safe_mode.include?(NO_PLUGINS)
|
||||
request.env[ONLY_OFFICIAL] = !!safe_mode.include?(ONLY_OFFICIAL)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user