mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Introduce Program to include cfp/rooms/tracks/events/event_types/difficulty_levels
This commit is contained in:
parent
028b82fda8
commit
444356fbc7
117 changed files with 1812 additions and 905 deletions
|
|
@ -3,23 +3,24 @@ module Admin
|
|||
# By authorizing 'conference' resource, we can ensure there will be no unauthorized access to
|
||||
# the schedule of a conference, which should not be accessed in the first place
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource :program, through: :conference, singleton: true
|
||||
|
||||
skip_before_filter :verify_authenticity_token, only: [:update]
|
||||
layout 'schedule'
|
||||
|
||||
def show
|
||||
authorize! :update, @conference.events.new
|
||||
authorize! :update, @program.events.new
|
||||
if @conference.nil?
|
||||
redirect_to admin_conference_index_path
|
||||
return
|
||||
end
|
||||
@dates = @conference.start_date..@conference.end_date
|
||||
@rooms = @conference.rooms
|
||||
@rooms = @program.rooms
|
||||
end
|
||||
|
||||
def update
|
||||
authorize! :update, @conference.events.new
|
||||
event = Event.where(guid: event_params).first
|
||||
authorize! :update, @program.events.new
|
||||
event = Event.where(guid: params[:event]).first
|
||||
error_message = nil
|
||||
if event.nil?
|
||||
error_message = "Could not find event GUID: #{params[:event]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue