Class: Users::BuildService

Inherits:
BaseService show all
Defined in:
app/services/users/build_service.rb

Constant Summary collapse

ALLOWED_USER_TYPES =
%i[project_bot security_policy_bot].freeze

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, params = {}) ⇒ BuildService

Returns a new instance of BuildService.



11
12
13
14
15
# File 'app/services/users/build_service.rb', line 11

def initialize(current_user, params = {})
  @current_user = current_user
  @params = params.dup
  @identity_params = params.slice(*identity_attributes)
end

Instance Method Details

#executeObject



17
18
19
20
21
22
23
# File 'app/services/users/build_service.rb', line 17

def execute
  build_user
  build_identity
  update_canonical_email

  user
end