YaleSTC/cardswipr

View on GitHub
app/policies/attendance_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

# Policies for Attendance resources/actions
class AttendancePolicy < ApplicationPolicy
  def create?
    index?
  end

  def index?
    user_can_modify_event?(user, record.event)
  end

  def destroy?
    index?
  end

  def export?
    index?
  end
end