Merge branch 'master' into master
This commit is contained in:
commit
7048a37eb6
294 changed files with 10474 additions and 3147 deletions
|
|
@ -25,7 +25,6 @@ module Osem
|
|||
|
||||
# Activate observers that should always be running.
|
||||
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
||||
config.active_record.observers = :revision_observer
|
||||
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
|
|
|
|||
7
config/database.yml.docker
Normal file
7
config/database.yml.docker
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
production:
|
||||
adapter: mysql2
|
||||
host: <%= ENV['DATABASE_HOST'] %>
|
||||
port: <%= ENV['DATABASE_PORT'] %>
|
||||
username: <%= ENV['MYSQL_USER'] %>
|
||||
password: <%= ENV['MYSQL_PASSWORD'] %>
|
||||
database: <%= ENV['MYSQL_DATABASE'] %>
|
||||
|
|
@ -36,7 +36,7 @@ Osem::Application.configure do
|
|||
# config.force_ssl = true
|
||||
|
||||
# See everything in the log (default is :info)
|
||||
# config.log_level = :debug
|
||||
config.log_level = :info
|
||||
|
||||
# Prepend all log lines with the following tags
|
||||
# config.log_tags = [ :subdomain, :uuid ]
|
||||
|
|
@ -77,8 +77,9 @@ Osem::Application.configure do
|
|||
user_name: ENV['OSEM_SMTP_USERNAME'],
|
||||
password: ENV['OSEM_SMTP_PASSWORD'],
|
||||
authentication: ENV['OSEM_SMTP_AUTHENTICATION'].try(:to_sym),
|
||||
domain: ENV['OSEM_SMTP_DOMAIN'],
|
||||
enable_starttls_auto: true
|
||||
domain: ENV['OSEM_SMTP_DOMAIN'],
|
||||
enable_starttls_auto: ENV['OSEM_SMTP_ENABLE_STARTTLS_AUTO'],
|
||||
openssl_verify_mode: ENV['OSEM_SMTP_OPENSSL_VERIFY_MODE']
|
||||
}
|
||||
|
||||
# Set the secret_key_base from the env, if not set by any other means
|
||||
|
|
|
|||
6
config/initializers/domain_constraint.rb
Normal file
6
config/initializers/domain_constraint.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class DomainConstraint
|
||||
def self.matches?(request)
|
||||
domains = Conference.where.not(custom_domain: nil).pluck(:custom_domain)
|
||||
domains.include?(request.domain)
|
||||
end
|
||||
end
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
Osem::Application.routes.draw do
|
||||
|
||||
constraints DomainConstraint do
|
||||
get '/', to: 'conferences#show'
|
||||
end
|
||||
|
||||
if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||
devise_for :users, controllers: { registrations: :registrations }
|
||||
else
|
||||
|
|
@ -15,18 +19,28 @@ Osem::Application.routes.draw do
|
|||
mount LetterOpenerWeb::Engine, at: "/letter_opener"
|
||||
end
|
||||
|
||||
resources :users, except: [:new, :index, :create, :destroy]
|
||||
resources :users, except: [:new, :index, :create, :destroy] do
|
||||
resources :openids, only: :destroy
|
||||
end
|
||||
|
||||
namespace :admin do
|
||||
resources :organizations do
|
||||
member do
|
||||
get :admins
|
||||
post :assign_org_admins
|
||||
delete :unassign_org_admins
|
||||
end
|
||||
end
|
||||
resources :users do
|
||||
member do
|
||||
patch :toggle_confirmation
|
||||
end
|
||||
end
|
||||
resource :ticket_scanning, only: [:create]
|
||||
resources :comments, only: [:index]
|
||||
resources :conferences do
|
||||
resource :contact, except: [:index, :new, :create, :show, :destroy]
|
||||
resources :schedules, only: [:index, :create, :show, :update, :destroy]
|
||||
resources :schedules, except: [:edit, :update]
|
||||
resources :event_schedules, only: [:create, :update, :destroy]
|
||||
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
||||
resources :commercials, only: [:index, :create, :update, :destroy]
|
||||
|
|
@ -34,6 +48,19 @@ Osem::Application.routes.draw do
|
|||
get '/volunteers' => 'volunteers#index', as: 'volunteers_info'
|
||||
patch '/volunteers' => 'volunteers#update', as: 'volunteers_update'
|
||||
|
||||
resources :booths do
|
||||
member do
|
||||
patch :accept
|
||||
patch :restart
|
||||
patch :to_accept
|
||||
patch :reject
|
||||
patch :reset
|
||||
patch :to_reject
|
||||
patch :cancel
|
||||
patch :confirm
|
||||
end
|
||||
end
|
||||
|
||||
resources :registrations, except: [:create, :new] do
|
||||
member do
|
||||
patch :toggle_attendance
|
||||
|
|
@ -50,8 +77,25 @@ Osem::Application.routes.draw do
|
|||
end
|
||||
resource :registration_period
|
||||
resource :program do
|
||||
resource :cfp
|
||||
resources :tracks
|
||||
resources :cfps
|
||||
resources :tracks do
|
||||
member do
|
||||
patch :toggle_cfp_inclusion
|
||||
patch :restart
|
||||
patch :to_accept
|
||||
patch :accept
|
||||
patch :confirm
|
||||
patch :to_reject
|
||||
patch :reject
|
||||
patch :cancel
|
||||
patch :update_selected_schedule
|
||||
end
|
||||
resources :roles, only: [:show, :edit, :update] do
|
||||
member do
|
||||
post :toggle_user
|
||||
end
|
||||
end
|
||||
end
|
||||
resources :event_types
|
||||
resources :difficulty_levels
|
||||
resources :events do
|
||||
|
|
@ -78,7 +122,8 @@ Osem::Application.routes.draw do
|
|||
resources :targets, except: [:show]
|
||||
resources :campaigns, except: [:show]
|
||||
resources :emails, only: [:show, :update, :index]
|
||||
resources :roles, except: [ :new, :create ] do
|
||||
resources :physical_tickets, only: [:index]
|
||||
resources :roles, except: [:new, :create] do
|
||||
member do
|
||||
post :toggle_user
|
||||
end
|
||||
|
|
@ -96,14 +141,23 @@ Osem::Application.routes.draw do
|
|||
patch :update_conference
|
||||
end
|
||||
end
|
||||
|
||||
get '/revision_history' => 'versions#index'
|
||||
end
|
||||
|
||||
get '/revision_history' => 'versions#index'
|
||||
get '/revision_history/:id/revert_object' => 'versions#revert_object', as: 'revision_history_revert_object'
|
||||
get '/revision_history/:id/revert_attribute' => 'versions#revert_attribute', as: 'revision_history_revert_attribute'
|
||||
end
|
||||
|
||||
resources :organizations, only: [:index]
|
||||
resources :conferences, only: [:index, :show] do
|
||||
resources :booths do
|
||||
member do
|
||||
patch :withdraw
|
||||
patch :confirm
|
||||
patch :restart
|
||||
end
|
||||
end
|
||||
resource :program, only: [] do
|
||||
resources :proposals, except: :destroy do
|
||||
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
||||
|
|
@ -111,18 +165,25 @@ Osem::Application.routes.draw do
|
|||
member do
|
||||
get :registrations
|
||||
patch '/withdraw' => 'proposals#withdraw'
|
||||
get :registrations
|
||||
patch '/confirm' => 'proposals#confirm'
|
||||
patch '/restart' => 'proposals#restart'
|
||||
end
|
||||
end
|
||||
resources :tracks, except: :destroy do
|
||||
member do
|
||||
patch :restart
|
||||
patch :confirm
|
||||
patch :withdraw
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# TODO: change conference_registrations to singular resource
|
||||
resource :conference_registration, path: 'register'
|
||||
resources :tickets, only: [:index]
|
||||
resources :ticket_purchases, only: [:create, :destroy]
|
||||
resources :ticket_purchases, only: [:create, :destroy, :index]
|
||||
resources :payments, only: [:index, :new, :create]
|
||||
resources :physical_tickets, only: [:index, :show]
|
||||
resource :subscriptions, only: [:create, :destroy]
|
||||
resource :schedule, only: [:show] do
|
||||
member do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue