mirror of
https://github.com/discourse/discourse.git
synced 2025-09-04 08:47:37 +08:00
correct environment handling for test mode
This commit is contained in:
parent
873a07a625
commit
ed2e62f845
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue