appeal_policy.rb 267 B

123456789101112131415
  1. # frozen_string_literal: true
  2. class AppealPolicy < ApplicationPolicy
  3. def index?
  4. role.can?(:manage_appeals)
  5. end
  6. def approve?
  7. record.pending? && role.can?(:manage_appeals)
  8. end
  9. def reject?
  10. record.pending? && role.can?(:manage_appeals)
  11. end
  12. end