From d4be96747860ec0c5e9e64a1095a1dd95c48545c Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 17 Sep 2015 23:27:08 +0200 Subject: Fix 500 when accessing private project when not logged in --- Gemfile.lock | 3 --- app/controllers/ci/application_controller.rb | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index eeaddc95a8e..f43e885ce48 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -928,6 +928,3 @@ DEPENDENCIES webmock (~> 1.21.0) whenever (~> 0.8.4) wikicloth (= 0.8.1) - -BUNDLED WITH - 1.10.6 diff --git a/app/controllers/ci/application_controller.rb b/app/controllers/ci/application_controller.rb index a5868da377f..d45c4e9caf1 100644 --- a/app/controllers/ci/application_controller.rb +++ b/app/controllers/ci/application_controller.rb @@ -10,9 +10,7 @@ module Ci def authenticate_public_page! unless project.public - unless current_user - redirect_to(new_user_sessions_path) and return - end + authenticate_user! return access_denied! unless can?(current_user, :read_project, gl_project) end -- cgit v1.2.1