config/initializers/tramway.rb in tramway-event-1.9.21.1 vs config/initializers/tramway.rb in tramway-event-1.9.22
- old
+ new
@@ -6,6 +6,8 @@
::Tramway::Event::Section,
::Tramway::Event::Person,
::Tramway::Event::Partaking,
::Tramway::Event::Place,
project: :event)
-::Tramway::Admin.set_notificable_queries new_participants: -> { ::Tramway::Event::Participant.active.where(participation_state: :requested) }
+::Tramway::Admin.set_notificable_queries new_participants: -> (current_user) do
+ ::Tramway::Event::Participant.active.where(participation_state: :requested).send "#{current_user.role}_scope", current_user.id
+end