Class: Members::BaseService

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

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

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

#initialize(current_user = nil, params = {}) ⇒ BaseService

current_user - The user that performs the action params - A hash of parameters



7
8
9
10
11
12
13
14
15
# File 'app/services/members/base_service.rb', line 7

def initialize(current_user = nil, params = {})
  @current_user = current_user
  @params = params

  # could be a string, force to an integer, part of fix
  # https://gitlab.com/gitlab-org/gitlab/-/issues/219496
  # Allow the ArgumentError to be raised if it can't be converted to an integer.
  @params[:access_level] = Integer(@params[:access_level]) if @params[:access_level]
end

Instance Method Details

#after_execute(args) ⇒ Object



17
18
19
# File 'app/services/members/base_service.rb', line 17

def after_execute(args)
  # overridden in EE::Members modules
end