Skip to content
Snippets Groups Projects
Commit 4e37f761 authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'fix-homepage-redirection' into 'master'

Fix redirection to home page URL for unauthorized users

Redirection to the home page URL was broken by changing the target for
`root_url` from `DashboardController` to `RootController` in
94d3c143. This regression was introduced
in the 7.12.0 release.

Fixes #1916.

See merge request !928
parents a6a0792e bee3979a
Branches
Tags
No related merge requests found
Pipeline #
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
   
v 7.13.0 (unreleased) v 7.13.0 (unreleased)
- Fix redirection to home page URL for unauthorized users (Daniel Gerhardt)
- Fix external issue tracker hook/test for HTTPS URLs (Daniel Gerhardt) - Fix external issue tracker hook/test for HTTPS URLs (Daniel Gerhardt)
- Remove link leading to a 404 error in Deploy Keys page (Stan Hu) - Remove link leading to a 404 error in Deploy Keys page (Stan Hu)
- Add support for unlocking users in admin settings (Stan Hu) - Add support for unlocking users in admin settings (Stan Hu)
Loading
Loading
Loading
@@ -56,7 +56,7 @@ class ApplicationController < ActionController::Base
Loading
@@ -56,7 +56,7 @@ class ApplicationController < ActionController::Base
def authenticate_user!(*args) def authenticate_user!(*args)
# If user is not signed-in and tries to access root_path - redirect him to landing page # If user is not signed-in and tries to access root_path - redirect him to landing page
if current_application_settings.home_page_url.present? if current_application_settings.home_page_url.present?
if current_user.nil? && controller_name == 'dashboard' && action_name == 'show' if current_user.nil? && root_path == request.path
redirect_to current_application_settings.home_page_url and return redirect_to current_application_settings.home_page_url and return
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment