2019-04-28 21:10:54 +03:00
|
|
|
require "csv"
|
2014-09-17 12:43:17 +03:00
|
|
|
module Management
|
|
|
|
class ManagementController < ::ApplicationController
|
2014-09-17 14:30:50 +03:00
|
|
|
before_action :authenticate_user!, :authorize_user!
|
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
layout "management"
|
2014-09-17 14:30:50 +03:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def authorize_user!
|
2024-10-01 14:59:48 +03:00
|
|
|
if params[:conference_id] && params[:conference_id].to_i < Conference.last.id
|
|
|
|
head :forbidden unless current_user.admin? && current_user.owner?
|
|
|
|
else
|
|
|
|
head :forbidden unless current_user.admin?
|
|
|
|
end
|
2014-09-17 14:30:50 +03:00
|
|
|
end
|
2014-09-17 12:43:17 +03:00
|
|
|
end
|
|
|
|
end
|