Class: Import::BaseService

Inherits:
BaseService show all
Defined in:
app/services/import/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(client, user, params) ⇒ BaseService

Returns a new instance of BaseService.



5
6
7
8
9
# File 'app/services/import/base_service.rb', line 5

def initialize(client, user, params)
  @client = client
  @current_user = user
  @params = params
end

Instance Method Details

#authorized?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/services/import/base_service.rb', line 11

def authorized?
  can?(current_user, :import_projects, target_namespace)
end