Do not allow signed in users to registor unless registration is open

This commit is contained in:
Aditya Prakash 2016-03-14 23:38:55 +05:30
parent 7e4d91adaf
commit 7822a8d4e3
2 changed files with 11 additions and 5 deletions

View file

@ -72,6 +72,10 @@ class Ability
can :manage, Registration, user_id: user.id
can [:new, :create], Registration do |registration|
registration.conference.registration_open?
end
can :index, Ticket
can :manage, TicketPurchase, user_id: user.id