Class: BaseProjectService
- Inherits:
-
BaseContainerService
- Object
- BaseContainerService
- BaseProjectService
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/services/base_project_service.rb
Overview
Base class, scoped by project
Direct Known Subclasses
AlertManagement::Alerts::UpdateService, AlertManagement::HttpIntegrations::BaseService, Ci::JobArtifacts::DeleteProjectArtifactsService, ErrorTracking::BaseService, IncidentManagement::Incidents::CreateService, IncidentManagement::IssuableEscalationStatuses::AfterUpdateService, IncidentManagement::IssuableEscalationStatuses::BuildService, IncidentManagement::IssuableEscalationStatuses::CreateService, IncidentManagement::IssuableEscalationStatuses::PrepareUpdateService, IncidentManagement::LinkAlerts::BaseService, IncidentManagement::PagerDuty::ProcessWebhookService, Issuable::CommonSystemNotesService, IssueEmailParticipants::BaseService, MergeRequests::AssignIssuesService, MergeRequests::GetUrlsService, MergeRequests::LinkLfsObjectsService, MergeRequests::PushOptionsHandlerService, Packages::Cleanup::UpdatePolicyService, Packages::Protection::CheckRuleExistenceService, Packages::Protection::CreateRuleService, Projects::Alerting::NotifyService, Projects::DeployTokens::RevokeService, Projects::Prometheus::Alerts::NotifyService, ServiceDesk::CustomEmailVerifications::BaseService, ServiceDesk::CustomEmails::BaseService, Snippets::BaseService
Instance Attribute Summary collapse
-
#project ⇒ Object
Returns the value of attribute project.
Attributes inherited from BaseContainerService
#container, #current_user, #group, #params
Instance Method Summary collapse
-
#initialize(project:, current_user: nil, params: {}) ⇒ BaseProjectService
constructor
A new instance of BaseProjectService.
Methods inherited from BaseContainerService
#group_container?, #namespace_container?, #project_container?, #root_ancestor
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
Constructor Details
#initialize(project:, current_user: nil, params: {}) ⇒ BaseProjectService
Returns a new instance of BaseProjectService.
9 10 11 12 13 14 15 |
# File 'app/services/base_project_service.rb', line 9 def initialize(project:, current_user: nil, params: {}) # we need to exclude project params since they may come from external requests. project should always # be passed as part of the service's initializer super(container: project, current_user: current_user, params: params.except(:project, :project_id)) @project = project end |
Instance Attribute Details
#project ⇒ Object
Returns the value of attribute project.
7 8 9 |
# File 'app/services/base_project_service.rb', line 7 def project @project end |