module Notifications
  class ItemPolicy < ApplicationPolicy
    def index?
      allowed?
    end

    def new?
      allowed?
    end

    def create?
      allowed?
    end

    def edit?
      allowed?
    end

    def update?
      allowed?
    end

    def destroy?
      allowed?
    end

    def markdown?
      allowed?
    end

    def allowed?
      user.permitted? BeefCake::Permission.for(:notifications)
    end
  end
end
