Commit 94f31ccc authored by Mike Greiling's avatar Mike Greiling

fix issue in which projects which have forks cannot be changed from private to public

parent 7fa0a3e7
......@@ -148,7 +148,7 @@ module ProjectsHelper
def can_change_visibility_level?(project, current_user)
return false unless can?(current_user, :change_visibility_level, project)
if project.fork_source
if project.forked? && project.fork_source
project.fork_source.visibility_level > Gitlab::VisibilityLevel::PRIVATE
else
true
......
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