Class: Members::ImportProjectTeamService

Inherits:
BaseService show all
Defined in:
app/services/members/import_project_team_service.rb

Instance Attribute Summary collapse

Attributes inherited from BaseService

#project

Instance Method Summary collapse

Methods inherited from BaseService

#after_execute, #initialize

Methods inherited from BaseService

#initialize

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

This class inherits a constructor from Members::BaseService

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user.


5
6
7
# File 'app/services/members/import_project_team_service.rb', line 5

def current_user
  @current_user
end

#paramsObject (readonly)

Returns the value of attribute params.


5
6
7
# File 'app/services/members/import_project_team_service.rb', line 5

def params
  @params
end

Instance Method Details

#executeObject


23
24
25
# File 'app/services/members/import_project_team_service.rb', line 23

def execute
  import_project_team
end

#source_projectObject


19
20
21
# File 'app/services/members/import_project_team_service.rb', line 19

def source_project
  @source_project ||= Project.find_by_id(source_project_id)
end

#source_project_idObject


11
12
13
# File 'app/services/members/import_project_team_service.rb', line 11

def source_project_id
  @source_project_id ||= params[:project_id].presence
end

#target_projectObject


15
16
17
# File 'app/services/members/import_project_team_service.rb', line 15

def target_project
  @target_project ||= Project.find_by_id(target_project_id)
end

#target_project_idObject


7
8
9
# File 'app/services/members/import_project_team_service.rb', line 7

def target_project_id
  @target_project_id ||= params[:id].presence
end