This commit is contained in:
Yan
2017-11-10 14:11:10 +06:30
parent fb64041a3f
commit a70f9a43e6
5 changed files with 18 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
# lookup domain for db from provision
before_action :lookup_domain, :set_locale
before_action :check_license, :lookup_domain, :set_locale
helper_method :current_company,:current_login_employee,:current_user
# alias_method :current_user, :current_login_employee,:current_user
@@ -94,10 +94,9 @@ class ApplicationController < ActionController::Base
private
def check_license
# if current_company.nil?
# redirect_to install_path
# end
if !File.directory?("/config/license.yml")
if License.check_license_file
else
redirect_to install_path
end
end