diff options
author | Cagdas Gerede <Earth@BlueSky> | 2016-11-15 01:59:11 +0300 |
---|---|---|
committer | Cagdas Gerede <Earth@BlueSky> | 2016-11-15 01:59:11 +0300 |
commit | 5f2d45c956eba7e24f5f8572409230383b663bfe (patch) | |
tree | 14a4bdf48aeb7bfbb8ee6e9257f6ab3893d484c2 /app/controllers | |
parent | 37cad72970c1e75f9c63425bba780d7bfe554b95 (diff) | |
download | gitlab-ce-5f2d45c956eba7e24f5f8572409230383b663bfe.tar.gz |
Add authentication for for create action. Add more tests for for new and create actions
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/forks_controller.rb | 3 |
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 |