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>2022-02-18 12:45:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
commita7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch)
tree7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/models/namespace.rb
parentee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff)
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 0dc20e0016c..5c55f4d3def 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -43,6 +43,7 @@ class Namespace < ApplicationRecord
has_many :projects, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
has_many :project_statistics
has_one :namespace_settings, inverse_of: :namespace, class_name: 'NamespaceSetting', autosave: true
+ has_one :namespace_statistics
has_one :namespace_route, foreign_key: :namespace_id, autosave: false, inverse_of: :namespace, class_name: 'Route'
has_many :namespace_members, foreign_key: :member_namespace_id, inverse_of: :member_namespace, class_name: 'Member'
@@ -492,6 +493,10 @@ class Namespace < ApplicationRecord
end
end
+ def shared_runners
+ @shared_runners ||= shared_runners_enabled ? Ci::Runner.instance_type : Ci::Runner.none
+ end
+
def root?
!has_parent?
end
@@ -508,6 +513,12 @@ class Namespace < ApplicationRecord
Feature.enabled?(:create_project_namespace_on_project_create, self, default_enabled: :yaml)
end
+ def storage_enforcement_date
+ # should return something like Date.new(2022, 02, 03)
+ # TBD: https://gitlab.com/gitlab-org/gitlab/-/issues/350632
+ nil
+ end
+
private
def expire_child_caches