summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2015-11-03 18:23:48 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2015-11-03 18:23:48 +0100
commit7cb442eed4f488e378b3f20008ebe6ed3b53d31d (patch)
treebe041e92cb432b4623f5ebd215836022fedc0bbb /app/models/project.rb
parent9e1db139eb1387fa9658ed68592d93eca61efb6b (diff)
downloadgitlab-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.rb2
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