ios support
This commit is contained in:
@@ -15,7 +15,6 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
private
|
||||
|
||||
|
||||
def allow_all_origins
|
||||
headers['Access-Control-Allow-Origin'] = '*'
|
||||
headers['Access-Control-Request-Method'] = '*'
|
||||
@@ -24,7 +23,11 @@ private
|
||||
end
|
||||
|
||||
def authorize_cmtool
|
||||
redirect_to '/', alert: t('general.unauthorized') unless current_user.present? && current_user.admin?
|
||||
redirect_to new_administrator_session_path, alert: t('general.unauthorized') unless current_administrator.present?
|
||||
end
|
||||
|
||||
def cmtool_user
|
||||
current_administrator
|
||||
end
|
||||
|
||||
def cmtool_locale
|
||||
@@ -65,6 +68,7 @@ private
|
||||
def after_sign_in_path_for(resource)
|
||||
case resource
|
||||
when Employee then supplier_root_path
|
||||
when Administrator then cmtool.root_path
|
||||
else root_path
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user