summaryrefslogtreecommitdiff
path: root/app/services/projects/create_service.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-03-01 21:23:00 +0100
committerToon Claes <toon@gitlab.com>2017-03-02 12:15:25 +0100
commita3fdd6acd27f5aa98f13e7a0083d0c3208003ccb (patch)
treee174834a5aaf50b0444f829e8a2cfd678e833455 /app/services/projects/create_service.rb
parentbc20fa9b02d5fea8f5781b6397af10f006983111 (diff)
downloadgitlab-ce-a3fdd6acd27f5aa98f13e7a0083d0c3208003ccb.tar.gz
Use string based `visibility` getter & setter
Add `visibility` & `visibility=` methods to the `Gitlab::VisibilityLevel` module so the `visibility_level` can be get/set with a string value.
Diffstat (limited to 'app/services/projects/create_service.rb')
-rw-r--r--app/services/projects/create_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb
index 6dc3d8c2416..fbdaa455651 100644
--- a/app/services/projects/create_service.rb
+++ b/app/services/projects/create_service.rb
@@ -12,7 +12,7 @@ module Projects
@project = Project.new(params)
# Make sure that the user is allowed to use the specified visibility level
- unless Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level])
+ unless Gitlab::VisibilityLevel.allowed_for?(current_user, @project.visibility_level)
deny_visibility_level(@project)
return @project
end