Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-03-01 23:23:00 +0300
committerToon Claes <toon@gitlab.com>2017-03-02 14:15:25 +0300
commita3fdd6acd27f5aa98f13e7a0083d0c3208003ccb (patch)
treee174834a5aaf50b0444f829e8a2cfd678e833455 /app/services/projects
parentbc20fa9b02d5fea8f5781b6397af10f006983111 (diff)
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')
-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