ios support

This commit is contained in:
2015-03-04 20:48:24 +01:00
parent e02d32156f
commit 3cf8d3c896
22 changed files with 127 additions and 53 deletions
+6 -2
View File
@@ -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