Commit 0f2de048 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'rs-namespace-feature-ee' into 'master'

Flag `Namespace#feature_available?` as override

See merge request gitlab-org/gitlab-ee!14650
parents 268d18bf 5ace6925
......@@ -263,6 +263,11 @@ class Namespace < ApplicationRecord
false
end
# Overridden in EE::Namespace
def feature_available?(_feature)
false
end
def full_path_before_last_save
if parent_id_before_last_save.nil?
path_before_last_save
......
......@@ -112,6 +112,7 @@ module EE
# Checks features (i.e. https://about.gitlab.com/pricing/) availabily
# for a given Namespace plan. This method should consider ancestor groups
# being licensed.
override :feature_available?
def feature_available?(feature)
# This feature might not be behind a feature flag at all, so default to true
return false unless ::Feature.enabled?(feature, default_enabled: true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment