diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-01 23:23:00 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-02 14:15:25 +0300 |
commit | a3fdd6acd27f5aa98f13e7a0083d0c3208003ccb (patch) | |
tree | e174834a5aaf50b0444f829e8a2cfd678e833455 /app/services/projects/create_service.rb | |
parent | bc20fa9b02d5fea8f5781b6397af10f006983111 (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/create_service.rb')
-rw-r--r-- | app/services/projects/create_service.rb | 2 |
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 |