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