summaryrefslogtreecommitdiff
path: root/app/models/project_feature.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_feature.rb')
-rw-r--r--app/models/project_feature.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/project_feature.rb b/app/models/project_feature.rb
index d74cb2506ba..346db2847d8 100644
--- a/app/models/project_feature.rb
+++ b/app/models/project_feature.rb
@@ -59,6 +59,9 @@ class ProjectFeature < ActiveRecord::Base
after_update :update_site_statistics
def feature_available?(feature, user)
+ # This feature might not be behind a feature flag at all, so default to true
+ return false unless ::Feature.enabled?(feature, user, default_enabled: true)
+
get_permission(user, access_level(feature))
end