summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/user_sessions_controller.rb4
-rw-r--r--app/views/user_sessions/new.html.haml2
-rw-r--r--config/routes.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/user_sessions_controller.rb b/app/controllers/user_sessions_controller.rb
index b6df291..044849b 100644
--- a/app/controllers/user_sessions_controller.rb
+++ b/app/controllers/user_sessions_controller.rb
@@ -1,5 +1,5 @@
class UserSessionsController < ApplicationController
- before_filter :authenticate_user!, except: [:new, :callback, :to_gitlab]
+ before_filter :authenticate_user!, except: [:new, :callback, :auth]
def show
@user = current_user
@@ -8,7 +8,7 @@ class UserSessionsController < ApplicationController
def new
end
- def to_gitlab
+ def auth
redirect_to client.auth_code.authorize_url({
redirect_uri: callback_user_sessions_url
})
diff --git a/app/views/user_sessions/new.html.haml b/app/views/user_sessions/new.html.haml
index 5f34788..9ac5dcc 100644
--- a/app/views/user_sessions/new.html.haml
+++ b/app/views/user_sessions/new.html.haml
@@ -1 +1 @@
-= link_to "Sign in", to_gitlab_user_sessions_path \ No newline at end of file
+= link_to "Please authorize with GitLab", auth_user_sessions_path \ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index ce4dcbd..40a73fd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -45,7 +45,7 @@ GitlabCi::Application.routes.draw do
end
resource :user_sessions do
- get :to_gitlab
+ get :auth
get :callback
end