Allow viewing the schedule/events in ichain mode

This abilit is not specific to one mode.
This commit is contained in:
Henne Vogelsang 2019-03-05 21:00:38 +01:00
parent 4ef067328e
commit b57c771d3e
No known key found for this signature in database
GPG key ID: 9D6164C2955FADE0

View file

@ -31,6 +31,10 @@ class Ability
event.state == 'confirmed'
end
can [:show, :events], Schedule do |schedule|
schedule.program.schedule_public
end
# can view Commercials of confirmed Events
can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id)
can [:show, :create], User
@ -52,10 +56,6 @@ class Ability
event.program.cfp_open? && event.new_record?
end
can [:show, :events], Schedule do |schedule|
schedule.program.schedule_public
end
can [:index, :show], Survey, surveyable_type: 'Conference'
end
end