Logged in user should be able to read internal forks.

This commit is contained in:
Rubén Dávila 2016-02-27 10:04:36 -05:00
parent f96ce4079f
commit 8c948548e1

View file

@ -8,7 +8,7 @@ class Projects::ForksController < Projects::ApplicationController
@forks = if current_user @forks = if current_user
base_query.where('projects.visibility_level IN (?) OR projects.id IN (?)', base_query.where('projects.visibility_level IN (?) OR projects.id IN (?)',
Project::PUBLIC, Project.public_and_internal_levels,
current_user.authorized_projects.pluck(:id)) current_user.authorized_projects.pluck(:id))
else else
base_query.where('projects.visibility_level = ?', Project::PUBLIC) base_query.where('projects.visibility_level = ?', Project::PUBLIC)