Project#feature_available? is missing feature flag check in overridden EE method

The method gets overridden here as such:

    def feature_available?(feature, user = nil)
      if ProjectFeature::FEATURES.include?(feature)
        super
      else
        licensed_feature_available?(feature)
      end
    end

We can ignore the first condition since the check will be handled by the super. We need to add the ::Feature.enabled? check to licensed_feature_available?.

See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4213#note_106858716.

cc @mdelaossa

Assignee Loading
Time tracking Loading