File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,11 @@ def self.prepare_backend
58
58
else
59
59
redirect_to spree . admin_unauthorized_path
60
60
end
61
+ elsif Spree ::Auth ::Engine . redirect_back_on_unauthorized?
62
+ store_spree_user_location!
63
+ redirect_back ( fallback_location : spree . admin_login_path )
61
64
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
68
66
end
69
67
end
70
68
end
@@ -79,13 +77,11 @@ def self.prepare_frontend
79
77
else
80
78
redirect_to spree . unauthorized_path
81
79
end
80
+ elsif Spree ::Auth ::Engine . redirect_back_on_unauthorized?
81
+ store_spree_user_location!
82
+ redirect_back ( fallback_location : spree . login_path )
82
83
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
89
85
end
90
86
end
91
87
end
You can’t perform that action at this time.
0 commit comments