license and local move to base action and update other base
This commit is contained in:
@@ -7,7 +7,8 @@ class ApplicationController < ActionController::Base
|
||||
# lookup domain for db from provision
|
||||
# before_action :set_locale
|
||||
|
||||
helper_method :current_company,:current_login_employee,:current_user
|
||||
# helper_method :current_company,:current_login_employee,:current_user
|
||||
|
||||
# alias_method :current_user, :current_login_employee,:current_user
|
||||
#this is base api base controller to need to inherit.
|
||||
#all token authentication must be done here
|
||||
@@ -18,6 +19,7 @@ class ApplicationController < ActionController::Base
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
private
|
||||
def current_user
|
||||
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
|
||||
end
|
||||
@@ -36,7 +38,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
end
|
||||
|
||||
def current_login_employee
|
||||
def current_login_employee
|
||||
if (!session[:session_token].nil?)
|
||||
@employee = Employee.find_by_token_session(session[:session_token])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user