about summary refs log tree commit diff
path: root/app/lib/admin/system_check/rules_check.rb
blob: 8206a5df391594d9f52ca2c50710a4011f46e6f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class Admin::SystemCheck::RulesCheck < Admin::SystemCheck::BaseCheck
  include RoutingHelper

  def skip?
    !current_user.can?(:manage_rules)
  end

  def pass?
    Rule.kept.exists?
  end

  def message
    Admin::SystemCheck::Message.new(:rules_check, nil, admin_rules_path)
  end
end