Merge 7822a8d4e3 into 6cde2a5f4a
This commit is contained in:
commit
19855d9cba
9 changed files with 469 additions and 34 deletions
|
|
@ -46,9 +46,13 @@ class Ability
|
|||
can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id)
|
||||
can :show, User
|
||||
unless CONFIG['authentication']['ichain']['enabled']
|
||||
can [:show, :create], Registration do |registration|
|
||||
can :show, Registration do |registration|
|
||||
registration.new_record?
|
||||
end
|
||||
|
||||
can [:new, :create], Registration do |registration|
|
||||
registration.conference.registration_open? && registration.new_record?
|
||||
end
|
||||
can :show, Event do |event|
|
||||
event.new_record?
|
||||
end
|
||||
|
|
@ -68,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue