Commit 4acedecc authored by Cagdas Gerede's avatar Cagdas Gerede

Fixing the issue of visiting a project fork url giving 500 error when not...

Fixing the issue of visiting a project fork url giving 500 error when not signed in instead of being redirected to the sign in page. The main reason is ApplicationController skips authentication if the project exists. To fix the issue, forced the authentication in ForksController when current_user is nil.
parent bcba8b25
...@@ -29,9 +29,13 @@ class Projects::ForksController < Projects::ApplicationController ...@@ -29,9 +29,13 @@ class Projects::ForksController < Projects::ApplicationController
end end
def new def new
if current_user.nil?
authenticate_user!
else
@namespaces = current_user.manageable_namespaces @namespaces = current_user.manageable_namespaces
@namespaces.delete(@project.namespace) @namespaces.delete(@project.namespace)
end end
end
def create def create
namespace = Namespace.find(params[:namespace_key]) namespace = Namespace.find(params[:namespace_key])
......
---
title: Fixing the issue of the project fork url giving 500 when not signed instead
of being redirected to sign in page
merge_request:
author: Cagdas Gerede
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment