license test

This commit is contained in:
Yan
2018-02-21 10:12:05 +06:30
parent 867148a038
commit cd95d1d5c9
5 changed files with 29 additions and 13 deletions

View File

@@ -2,7 +2,7 @@ module LoginVerification
extend ActiveSupport::Concern
included do
before_action :authenticate
# before_action :authenticate
helper_method :current_company,:current_login_employee
end
@@ -10,7 +10,7 @@ module LoginVerification
protected
# Authenticate the user with token based authentication
def authenticate
def authenticate
authenticate_session_token || render_unauthorized
end
@@ -18,7 +18,7 @@ module LoginVerification
token = session[:session_token]
if (token)
#@current_user = User.find_by(api_key: token)
Rails.logger.debug "token - " + token.to_s
#Rails.logger.debug "token - " + token.to_s
@user = Employee.authenticate_by_token(token)
if @user