20 lines
812 B
Ruby
20 lines
812 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Copyright (c) 2026, Kreisjagdverband Bautzen e.V. This file is part of
|
|
# hitobito_kjv and licensed under the Affero General Public License version 3
|
|
# or later. See the COPYING file at the top-level directory.
|
|
|
|
# Wird Person::CsvImportsController vorangestellt: "Beitrag bezahlt bis" lässt sich nur
|
|
# importieren, wenn der Benutzer den Beitragsstatus in der Gruppe verwalten darf
|
|
# (Kassier*in). Für alle anderen wird eine solche Spaltenzuordnung verworfen.
|
|
module Kjv::CsvImportsController
|
|
private
|
|
|
|
def field_mappings
|
|
mappings = super
|
|
return mappings if can?(:manage_membership_fees, group)
|
|
|
|
mappings = mappings.to_unsafe_h if mappings.respond_to?(:to_unsafe_h)
|
|
mappings.reject { |_header, field| field.to_s == Kjv::MembershipFee::ATTR.to_s }
|
|
end
|
|
end
|