Skip to content

Commit

Permalink
Treat some abo roles as only wizard managed, (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
amaierhofer committed Nov 20, 2024
1 parent 1dc1798 commit 42517e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion app/domain/sac_cas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,18 @@ module SacCas
::Group::AboTourenPortal::Abonnent
].freeze

# Prevent those from being edited via roles UI
WIZARD_MANAGED_ROLES = [
::Group::SektionsMitglieder::Mitglied,
::Group::SektionsMitglieder::MitgliedZusatzsektion,
::Group::SektionsNeuanmeldungenNv::Neuanmeldung,
::Group::SektionsNeuanmeldungenNv::NeuanmeldungZusatzsektion
::Group::SektionsNeuanmeldungenNv::NeuanmeldungZusatzsektion,
::Group::AboMagazin::Abonnent,
::Group::AboMagazin::Neuanmeldung,
::Group::AboMagazin::Gratisabonnent,
::Group::AboTourenPortal::Abonnent,
::Group::AboTourenPortal::Neuanmeldung,
::Group::AboTourenPortal::Gratisabonnent
].freeze

###
Expand Down
2 changes: 1 addition & 1 deletion spec/features/people/show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
end

describe "other roles" do
let(:role) { roles(:abonnent_alpen) }
let(:role) { roles(:tourenchef_bluemlisalp_ortsgruppe_ausserberg) }

it "shows delete button" do
visit group_person_path(group_id: role.group_id, id: role.person_id)
Expand Down
2 changes: 1 addition & 1 deletion spec/features/roles/fields_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
end

context "other role" do
let(:role) { roles(:abonnent_alpen) }
let(:role) { roles(:tourenchef_bluemlisalp_ortsgruppe_ausserberg) }

it "shows 'Von' field" do
expect(page).to have_text("Daten")
Expand Down

0 comments on commit 42517e6

Please sign in to comment.