Commit 54ddc018 authored by Alex Buijs's avatar Alex Buijs

Incorporate feedback fixes

parent 4b2c2f12
......@@ -10,9 +10,9 @@ module ConfirmEmailWarning
protected
def set_confirm_warning
return if peek_request? || json_request? || !request.get?
return unless current_user
return if current_user.confirmed?
return if peek_request? || json_request? || !request.get?
email = current_user.unconfirmed_email || current_user.email
......
......@@ -68,7 +68,7 @@ class RegistrationsController < Devise::RegistrationsController
def after_sign_up_path_for(user)
Gitlab::AppLogger.info(user_created_message(confirmed: user.confirmed?))
user.confirmed? || Feature.enabled?(:soft_email_confirmation) ? stored_location_for(user) || dashboard_projects_path : users_almost_there_path
confirmed_or_unconfirmed_access_allowed(user) ? stored_location_or_dashboard(user) : users_almost_there_path
end
def after_inactive_sign_up_path_for(resource)
......@@ -134,4 +134,12 @@ class RegistrationsController < Devise::RegistrationsController
def terms_accepted?
Gitlab::Utils.to_boolean(params[:terms_opt_in])
end
def confirmed_or_unconfirmed_access_allowed(user)
user.confirmed? || Feature.enabled?(:soft_email_confirmation)
end
def stored_location_or_dashboard(user)
stored_location_for(user) || dashboard_projects_path
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment