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,8 +29,12 @@ class Projects::ForksController < Projects::ApplicationController ...@@ -29,8 +29,12 @@ class Projects::ForksController < Projects::ApplicationController
end end
def new def new
@namespaces = current_user.manageable_namespaces if current_user.nil?
@namespaces.delete(@project.namespace) authenticate_user!
else
@namespaces = current_user.manageable_namespaces
@namespaces.delete(@project.namespace)
end
end end
def create def create
......
---
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