Merge remote-tracking branch 'origin/develop' into develop

dev_home
杨树明 5 years ago
commit 5d20258056

@ -6,7 +6,6 @@ class Admins::BaseController < ApplicationController
layout 'admin'
skip_before_action :verify_authenticity_token
skip_before_action :setup_laboratory
before_action :require_login, :require_admin!
@ -38,4 +37,9 @@ class Admins::BaseController < ApplicationController
append_js = ERB.new(File.open(path).read).result
response.body += append_js
end
# 重写此方法,防止影响超级管理员端云上实验室功能,因为那里重写了:current_laboratory方法
def setup_laboratory
Laboratory.current = Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)
end
end

@ -14,4 +14,6 @@ json.setting do
json.navbar setting.navbar || default_setting.navbar
json.footer setting.footer || default_setting.footer
json.main_site current_laboratory.main_site?
end
Loading…
Cancel
Save