forked from solidusio/solidus_auth_devise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to redirect back on unauthorized accesses
Only when the `redirect_back_on_unauthorized` preference exists and is set to true. This preference has been introduced in core with solidusio/solidus#3118 and we can rely on that preference to drive the behavior change here as well. The extra if Spree::Config.respond_to?(:redirect_back_on_unauthorized) check might seem useless but it's needed to avoid printing this deprecation warning on Solidus versions that still do not have the preference. If the Solidus verion used does not have the preference yet, the old behavior will be preserved.
- Loading branch information
Showing
3 changed files
with
117 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters