openSUSE/open-build-service

View on GitHub
src/api/app/controllers/concerns/flipper_feature.rb

Summary

Maintainability
A
0 mins
Test Coverage
D
60%
module FlipperFeature
  extend ActiveSupport::Concern

  def feature_enabled?(feature)
    return false if Flipper.enabled?(feature.to_sym, User.possibly_nobody)

    render file: Rails.public_path.join('404.html'), status: :not_found, layout: false
  end
end