Merge pull request #2390 from hennevogel/bugfix/schedules
Various update fixes
This commit is contained in:
commit
5a1f75e4f5
5 changed files with 82 additions and 13 deletions
|
|
@ -31,10 +31,23 @@ 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
|
||||
unless ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||
|
||||
can [:index, :show], Survey, surveyable_type: 'Conference'
|
||||
|
||||
# Things that are possible without ichain enabled that are **not*+ possible with ichain mode enabled.
|
||||
if ENV['OSEM_ICHAIN_ENABLED'] != 'true'
|
||||
# There is no reliable way for this workflow (enable not logged in users to fill out a form, then telling
|
||||
# them to sign up once they submit) in ichain. So enable it only without ichain.
|
||||
|
||||
# FIXME: The following abilities need to be checked. Are they about the type of workflow mentioned above? Or are
|
||||
# they just here because they worked in development mode (without ichain). We are suspicious that it's the latter!
|
||||
can :show, Registration do |registration|
|
||||
registration.new_record?
|
||||
end
|
||||
|
|
@ -51,12 +64,6 @@ class Ability
|
|||
can [:new, :create], Event do |event|
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@
|
|||
= link_to (current_or_last_object_state('Event', object.event_id).try(:title) || 'deleted'),
|
||||
admin_conference_program_event_path(conference_short_title, object.event_id)
|
||||
in
|
||||
= link_to "Schedule #{event_schedule.schedule_id}",
|
||||
admin_conference_schedule_path(conference_short_title, event_schedule.schedule_id)
|
||||
= link_to "Schedule #{version.item.schedule_id}",
|
||||
admin_conference_schedule_path(conference_short_title, version.item.schedule_id)
|
||||
|
||||
- when 'Schedule'
|
||||
= link_if_alive version, "Schedule #{version.item_id}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue