summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-07-11 12:22:35 -0500
committerRobert Speicher <rspeicher@gmail.com>2019-07-12 10:51:44 -0500
commit073f72cf91b7f284ab1f55fa781ee590a058bf05 (patch)
treeb7b79484208f215d5a14829f20e1ce851b1c22c9
parentf69232d506f82434e8b180e776c5b377fd461559 (diff)
downloadgitlab-ce-073f72cf91b7f284ab1f55fa781ee590a058bf05.tar.gz
Add Namespace#feature_available no-oprs-namespace-feature
This gets overridden in `EE::Namespace` and allows us to do things like always treat Epics as "disabled" in Core using the same checks we'd use elsewhere.
-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 1d95590bac9..b3021fab7f1 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -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