Skip to content
Snippets Groups Projects
Commit 4acedecc authored by Cagdas Gerede's avatar Cagdas Gerede
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -29,8 +29,12 @@ class Projects::ForksController < Projects::ApplicationController
end
 
def new
@namespaces = current_user.manageable_namespaces
@namespaces.delete(@project.namespace)
if current_user.nil?
authenticate_user!
else
@namespaces = current_user.manageable_namespaces
@namespaces.delete(@project.namespace)
end
end
 
def create
Loading
Loading
---
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment