rules_check.rb 320 B

1234567891011121314151617
  1. # frozen_string_literal: true
  2. class Admin::SystemCheck::RulesCheck < Admin::SystemCheck::BaseCheck
  3. include RoutingHelper
  4. def skip?
  5. !current_user.can?(:manage_rules)
  6. end
  7. def pass?
  8. Rule.kept.exists?
  9. end
  10. def message
  11. Admin::SystemCheck::Message.new(:rules_check, nil, admin_rules_path)
  12. end
  13. end