class SponsorPolicy < ApplicationPolicy
  def index?
    is_admin_or_chapter_organiser?
  end

  def create?
    user.has_role?(:admin) || Chapter.find_roles(:organiser, user).any?
  end

  def show?
    Chapter.find_roles(:organiser, user).any?
  end

  def edit?
    Chapter.find_roles(:organiser, user).any?
  end

  def update?
    Chapter.find_roles(:organiser, user).any?
  end
end

class SponsorPolicy < ApplicationPolicy
  def index?
    is_admin_or_chapter_organiser?
  end

  def create?
    is_admin_or_chapter_organiser?
  end

  def show?
    is_admin_or_chapter_organiser?
  end

  def edit?
    is_admin_or_chapter_organiser?
  end

  def update?
    is_admin_or_chapter_organiser?
  end
end

Allow admins to edit sponsors
Allow admins to edit sponsors
