summaryrefslogtreecommitdiff
path: root/app/models/namespace.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-01-25 17:50:09 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2017-01-25 17:50:09 +0000
commit6cfe60df2275dace9804f4bc37b9746a9eadc6fd (patch)
tree05e401f44722603121eb196d3097879b98e0aa0c /app/models/namespace.rb
parentb55c1bc4b5fb8d259ba9f264eff607f81012fa39 (diff)
parentb368447cf7fbd090704e22311dde72cd293d9779 (diff)
downloadgitlab-ce-6cfe60df2275dace9804f4bc37b9746a9eadc6fd.tar.gz
Merge branch 'backport-ee-changes-for-build-minutes' into 'master'
Backport changes introduced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1078 See merge request !8657
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 05f01445e67..67d8c1c2e4c 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -4,6 +4,7 @@ class Namespace < ActiveRecord::Base
include CacheMarkdownField
include Sortable
include Gitlab::ShellAdapter
+ include Gitlab::CurrentSettings
include Routable
cache_markdown_field :description, pipeline: :description
@@ -176,6 +177,10 @@ class Namespace < ActiveRecord::Base
end
end
+ def shared_runners_enabled?
+ projects.with_shared_runners.any?
+ end
+
def full_name
@full_name ||=
if parent