diff options
author | Robert Speicher <robert@gitlab.com> | 2018-01-23 01:54:24 +0300 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2018-01-23 16:04:38 +0300 |
commit | f899ed43c122caa7284b17b8b40d3b9e3c5c3a7a (patch) | |
tree | abacc259b9b8b0aea1d1aaf5bc679a40d7d5b3c6 /app | |
parent | bf93639b3dc9cc22eaddf70c48e5d142d53b6496 (diff) |
Merge branch '40612-cannot-change-project-visibility-from-private-even-when-owner' into 'master'
Resolve "Cannot change project visibility from Private (even when owner)"
Closes #40612
See merge request gitlab-org/gitlab-ce!16595
(cherry picked from commit 4bf2fded92e05420e6d103c8df63d6d83198a684)
94f31ccc fix issue in which projects which have forks cannot be changed from private to public
1eefc384 add CHANGELOG.md entry for !16595
003f140c ensure fork_source returns nil when project is the root fork, add tests
96862096 add test to can_change_visibility_level? method
de4993d4 remove redundant forked? check
2c1d7c09 fix spacing and wrap method params in parens
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index fbe65e700a4..53a306b8258 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1023,6 +1023,8 @@ class Project < ActiveRecord::Base end def fork_source + return nil unless forked? + forked_from_project || fork_network&.root_project end |