diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-22 00:08:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-22 00:08:16 +0300 |
commit | faaef22ae32e27117e83dc37334948d3b9b32501 (patch) | |
tree | a1364e3914c885e57cedcf64fc41b3c41666c00a /app/models/namespace.rb | |
parent | d380b256b976811e54dc4eb7c9ba3ecc5a9ab5be (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index d7d53956656..5dcda413ae5 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -33,9 +33,11 @@ class Namespace < ApplicationRecord NUMBER_OF_ANCESTORS_ALLOWED = 20 SR_DISABLED_AND_UNOVERRIDABLE = 'disabled_and_unoverridable' + # DISABLED_WITH_OVERRIDE is deprecated in favour of DISABLED_AND_OVERRIDABLE. SR_DISABLED_WITH_OVERRIDE = 'disabled_with_override' + SR_DISABLED_AND_OVERRIDABLE = 'disabled_and_overridable' SR_ENABLED = 'enabled' - SHARED_RUNNERS_SETTINGS = [SR_DISABLED_AND_UNOVERRIDABLE, SR_DISABLED_WITH_OVERRIDE, SR_ENABLED].freeze + SHARED_RUNNERS_SETTINGS = [SR_DISABLED_AND_UNOVERRIDABLE, SR_DISABLED_WITH_OVERRIDE, SR_DISABLED_AND_OVERRIDABLE, SR_ENABLED].freeze URL_MAX_LENGTH = 255 PATH_TRAILING_VIOLATIONS = %w[.git .atom .].freeze @@ -556,7 +558,7 @@ class Namespace < ApplicationRecord if shared_runners_enabled SR_ENABLED elsif allow_descendants_override_disabled_shared_runners - SR_DISABLED_WITH_OVERRIDE + SR_DISABLED_AND_OVERRIDABLE else SR_DISABLED_AND_UNOVERRIDABLE end @@ -566,10 +568,10 @@ class Namespace < ApplicationRecord case other_setting when SR_ENABLED false - when SR_DISABLED_WITH_OVERRIDE + when SR_DISABLED_WITH_OVERRIDE, SR_DISABLED_AND_OVERRIDABLE shared_runners_setting == SR_ENABLED when SR_DISABLED_AND_UNOVERRIDABLE - shared_runners_setting == SR_ENABLED || shared_runners_setting == SR_DISABLED_WITH_OVERRIDE + shared_runners_setting == SR_ENABLED || shared_runners_setting == SR_DISABLED_AND_OVERRIDABLE || shared_runners_setting == SR_DISABLED_WITH_OVERRIDE else raise ArgumentError end |