Commit 5c713f73 authored by Jarka Kadlecova's avatar Jarka Kadlecova

fix conflict reoslution for groups/create_service.rb

parent ae10e20f
......@@ -8,20 +8,10 @@ module Groups
def execute
@group = Group.new(params)
unless Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level])
deny_visibility_level(@group)
return @group
end
# Repository size limit comes as MB from the view
limit = params.delete(:repository_size_limit)
@group.repository_size_limit = Gitlab::Utils.try_megabytes_to_bytes(limit) if limit
if @group.parent && !can?(current_user, :create_subgroup, @group.parent)
@group.parent = nil
@group.errors.add(:parent_id, 'You don’t have permission to create a subgroup in this group.')
end
unless can_use_visibility_level? && can_create_group?
return @group
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment