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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCagdas Gerede <Earth@BlueSky>2016-11-15 01:59:11 +0300
committerCagdas Gerede <Earth@BlueSky>2016-11-15 01:59:11 +0300
commit5f2d45c956eba7e24f5f8572409230383b663bfe (patch)
tree14a4bdf48aeb7bfbb8ee6e9257f6ab3893d484c2 /app/controllers/projects/forks_controller.rb
parent37cad72970c1e75f9c63425bba780d7bfe554b95 (diff)
Add authentication for for create action. Add more tests for for new and create actions
Diffstat (limited to 'app/controllers/projects/forks_controller.rb')
-rw-r--r--app/controllers/projects/forks_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/forks_controller.rb b/app/controllers/projects/forks_controller.rb
index 5151b7747ce..ba46e2528e6 100644
--- a/app/controllers/projects/forks_controller.rb
+++ b/app/controllers/projects/forks_controller.rb
@@ -4,6 +4,7 @@ class Projects::ForksController < Projects::ApplicationController
# Authorize
before_action :require_non_empty_project
before_action :authorize_download_code!
+ before_action :authenticate_user!, only: [:new, :create]
def index
base_query = project.forks.includes(:creator)
@@ -29,8 +30,6 @@ class Projects::ForksController < Projects::ApplicationController
end
def new
- return authenticate_user! unless current_user
-
@namespaces = current_user.manageable_namespaces
@namespaces.delete(@project.namespace)
end