check exception in check_user

This commit is contained in:
phyusin
2018-05-03 17:53:07 +06:30
parent 9e54aa1a27
commit ffd3f5f158

View File

@@ -5,7 +5,6 @@ class BaseOrigamiController < ActionController::Base
before_action :check_user
#before_action :check_installation
protect_from_forgery with: :exception
helper_method :shop_detail, :current_token
@@ -23,6 +22,10 @@ class BaseOrigamiController < ActionController::Base
}.to_json
end
else
if ENV["SERVER_MODE"] != 'cloud'
protect_from_forgery with: :exception
end
if current_user.nil?
redirect_to root_path
end