add license

This commit is contained in:
Yan
2017-11-09 14:41:35 +06:30
parent eba30f6566
commit 121338677c
4 changed files with 12 additions and 22 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,7 +94,10 @@ class ApplicationController < ActionController::Base
private
def check_license
if current_company.nil?
# if current_company.nil?
# redirect_to install_path
# end
if !File.directory?("/config/license.yml")
redirect_to install_path
end
end