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

create_service.rb « group_links « projects « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1392775f8053c7a84e951437a570494410b8eca2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Projects
  module GroupLinks
    class CreateService < BaseService
      def execute(group)
        return false unless group

        project.project_group_links.create(
          group: group,
          group_access: params[:link_group_access],
          expires_at: params[:expires_at]
        )
      end
    end
  end
end