Class: TwoFactor::BaseService

Inherits:
Object
  • Object
show all
Includes:
BaseServiceUtility
Defined in:
app/services/two_factor/base_service.rb

Direct Known Subclasses

DestroyService

Instance Attribute Summary collapse

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 = {}) ⇒ BaseService

Returns a new instance of BaseService.


9
10
11
12
13
# File 'app/services/two_factor/base_service.rb', line 9

def initialize(current_user, params = {})
  @current_user = current_user
  @params = params
  @user = params.delete(:user)
end

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user.


7
8
9
# File 'app/services/two_factor/base_service.rb', line 7

def current_user
  @current_user
end

#paramsObject (readonly)

Returns the value of attribute params.


7
8
9
# File 'app/services/two_factor/base_service.rb', line 7

def params
  @params
end

#userObject (readonly)

Returns the value of attribute user.


7
8
9
# File 'app/services/two_factor/base_service.rb', line 7

def user
  @user
end