Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sessions_controller.rb « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f7d5ca08c051ff71e8cc83f69dff4fcde65caa25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class SessionsController < Devise::SessionsController

  def new
    redirect_url = if request.referer.present?
                     referer_uri = URI(request.referer)
                     if referer_uri.host == Gitlab.config.gitlab.host
                       referer_uri.path
                     else
                       request.fullpath
                     end
                   else
                     request.fullpath
                   end

    store_location_for(:redirect, redirect_url)

    super
  end

  def create
    super
  end
end