Allow viewing the schedule/events in ichain mode
This abilit is not specific to one mode.
This commit is contained in:
parent
4ef067328e
commit
b57c771d3e
1 changed files with 4 additions and 4 deletions
|
|
@ -31,6 +31,10 @@ class Ability
|
||||||
event.state == 'confirmed'
|
event.state == 'confirmed'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
can [:show, :events], Schedule do |schedule|
|
||||||
|
schedule.program.schedule_public
|
||||||
|
end
|
||||||
|
|
||||||
# can view Commercials of confirmed Events
|
# can view Commercials of confirmed Events
|
||||||
can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id)
|
can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id)
|
||||||
can [:show, :create], User
|
can [:show, :create], User
|
||||||
|
|
@ -52,10 +56,6 @@ class Ability
|
||||||
event.program.cfp_open? && event.new_record?
|
event.program.cfp_open? && event.new_record?
|
||||||
end
|
end
|
||||||
|
|
||||||
can [:show, :events], Schedule do |schedule|
|
|
||||||
schedule.program.schedule_public
|
|
||||||
end
|
|
||||||
|
|
||||||
can [:index, :show], Survey, surveyable_type: 'Conference'
|
can [:index, :show], Survey, surveyable_type: 'Conference'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue