add license
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user