File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,13 +58,11 @@ def self.prepare_backend
5858 else
5959 redirect_to spree . admin_unauthorized_path
6060 end
61+ elsif Spree ::Auth ::Engine . redirect_back_on_unauthorized?
62+ store_spree_user_location!
63+ redirect_back ( fallback_location : spree . admin_login_path )
6164 else
62-
63- if Spree ::Auth ::Engine . redirect_back_on_unauthorized?
64- redirect_back ( fallback_location : spree . admin_login_path )
65- else
66- redirect_to spree . admin_login_path
67- end
65+ redirect_to spree . admin_login_path
6866 end
6967 end
7068 end
@@ -79,13 +77,11 @@ def self.prepare_frontend
7977 else
8078 redirect_to spree . unauthorized_path
8179 end
80+ elsif Spree ::Auth ::Engine . redirect_back_on_unauthorized?
81+ store_spree_user_location!
82+ redirect_back ( fallback_location : spree . login_path )
8283 else
83-
84- if Spree ::Auth ::Engine . redirect_back_on_unauthorized?
85- redirect_back ( fallback_location : spree . login_path )
86- else
87- redirect_to spree . login_path
88- end
84+ redirect_to spree . login_path
8985 end
9086 end
9187 end
You can’t perform that action at this time.
0 commit comments