From 455fc0a270950c0fc120c80ca9d46028e42fca79 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 5 Mar 2019 21:23:14 +0100 Subject: [PATCH] Make it possible to view Surveys in ichain mode This is not ichain specific. --- app/models/ability.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 47d68705..85fe9cf8 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -39,6 +39,8 @@ class Ability can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id) can [:show, :create], User + 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 @@ -62,8 +64,6 @@ class Ability can [:new, :create], Event do |event| event.program.cfp_open? && event.new_record? end - - can [:index, :show], Survey, surveyable_type: 'Conference' end end