work with current supplier backend
This commit is contained in:
@@ -15,6 +15,15 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
private
|
||||
|
||||
def authenticate_employee!
|
||||
if auth_token = params[:auth_token].presence
|
||||
raise CanCan::AccessDenied unless employee = Employee.find_by_authentication_token(auth_token)
|
||||
sign_in employee
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def allow_all_origins
|
||||
headers['Access-Control-Allow-Origin'] = '*'
|
||||
headers['Access-Control-Request-Method'] = '*'
|
||||
|
||||
Reference in New Issue
Block a user