Enable registration to proceed without requiring a ticket.

Requiring a ticket after registration is convoluted; while it may be neccesary
for some workflows, it definitely isn't for others, and the core of osem
doesn't need it... so let's make it optional.
This commit is contained in:
James Mason 2018-12-29 00:08:32 -08:00 committed by Henne Vogelsang
parent 228190396c
commit 072116fffe
12 changed files with 168 additions and 128 deletions

View file

@ -117,10 +117,7 @@ class AdminAbility
can :manage, Commercial, commercialable_type: 'Conference',
commercialable_id: conf_ids
can :manage, Registration, conference_id: conf_ids
can :manage, RegistrationPeriod do |registration_period|
conference = registration_period.conference
conf_ids.include?(conference.id) && conference.tickets.for_registration.any?
end
can :manage, RegistrationPeriod, conference_id: conf_ids
can :manage, Booth, conference_id: conf_ids
can :manage, Question, conference_id: conf_ids
can :manage, Question do |question|