Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-27 00:09:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-27 00:09:22 +0300
commita8324cd026394f672b0ae482aef0f5007fe1db8e (patch)
tree32441bce3e2ae8440d122afd9194b9a8310d1cf5 /app/models
parent006a4f3c1c288c1ea59c3423225527897fa60d6e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/pipeline.rb1
-rw-r--r--app/models/group.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 92e3a3709ff..3fe414899aa 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -309,6 +309,7 @@ module Ci
scope :created_after, -> (time) { where('ci_pipelines.created_at > ?', time) }
scope :created_before_id, -> (id) { where('ci_pipelines.id < ?', id) }
scope :before_pipeline, -> (pipeline) { created_before_id(pipeline.id).outside_pipeline_family(pipeline) }
+ scope :eager_load_project, -> { eager_load(project: [:route, { namespace: :route }]) }
scope :outside_pipeline_family, ->(pipeline) do
where.not(id: pipeline.same_family_pipeline_ids)
diff --git a/app/models/group.rb b/app/models/group.rb
index 256488c44b5..96777f79915 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -119,6 +119,7 @@ class Group < Namespace
end
delegate :default_branch_name, to: :namespace_settings
+ delegate :resource_access_token_creation_allowed, :resource_access_token_creation_allowed=, :resource_access_token_creation_allowed?, to: :namespace_settings
class << self
def sort_by_attribute(method)