diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2015-11-03 18:23:48 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2015-11-03 18:23:48 +0100 |
commit | 7cb442eed4f488e378b3f20008ebe6ed3b53d31d (patch) | |
tree | be041e92cb432b4623f5ebd215836022fedc0bbb /app/models/project.rb | |
parent | 9e1db139eb1387fa9658ed68592d93eca61efb6b (diff) | |
download | gitlab-ce-7cb442eed4f488e378b3f20008ebe6ed3b53d31d.tar.gz |
Fix Project update service
When project is updated and it is a fork, then visibility_level
should not be less restrictive than in its parent project.
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index a4c634bdb5c..7f2dd37a3cc 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -786,6 +786,6 @@ class Project < ActiveRecord::Base def visibility_level_allowed?(level) return true unless forked? - Gitlab::VisibilityLevel.allowed_fork_levels(forked_from_project.visibility_level).include?(level) + Gitlab::VisibilityLevel.allowed_fork_levels(forked_from_project.visibility_level).include?(level.to_i) end end |