Run migration; add apple pay verification
This commit is contained in:
parent
0e9d6b491b
commit
d5f0063de6
3 changed files with 12 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ class ApplicationController < ActionController::Base
|
||||||
before_action :store_location
|
before_action :store_location
|
||||||
# Ensure every controller authorizes resource or skips authorization (skip_authorization_check)
|
# Ensure every controller authorizes resource or skips authorization (skip_authorization_check)
|
||||||
check_authorization unless: :devise_controller?
|
check_authorization unless: :devise_controller?
|
||||||
|
skip_authorization_check if:
|
||||||
|
|
||||||
def store_location
|
def store_location
|
||||||
# store last url - this is needed for post-login redirect to whatever the user last visited.
|
# store last url - this is needed for post-login redirect to whatever the user last visited.
|
||||||
|
|
@ -65,4 +66,9 @@ class ApplicationController < ActionController::Base
|
||||||
def not_found
|
def not_found
|
||||||
raise ActionController::RoutingError.new('Not Found')
|
raise ActionController::RoutingError.new('Not Found')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
skip_authorization_check only: :apple_pay
|
||||||
|
def apple_pay
|
||||||
|
render plain: ENV['OSEM_APPLE_PAY_ID']
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -230,4 +230,6 @@ Osem::Application.routes.draw do
|
||||||
else
|
else
|
||||||
root to: 'conferences#index', via: [:get, :options]
|
root to: 'conferences#index', via: [:get, :options]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get '/.well-known/apple-developer-merchantid-domain-association', to: 'application#apple_pay'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2020_03_31_214534) do
|
ActiveRecord::Schema.define(version: 2020_03_31_214534) do
|
||||||
|
|
||||||
|
# These are extensions that must be enabled in order to support this database
|
||||||
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
create_table "answers", force: :cascade do |t|
|
create_table "answers", force: :cascade do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
|
@ -638,7 +641,7 @@ ActiveRecord::Schema.define(version: 2020_03_31_214534) do
|
||||||
t.text "object_changes"
|
t.text "object_changes"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.integer "conference_id"
|
t.integer "conference_id"
|
||||||
t.integer "organization_id"
|
t.bigint "organization_id"
|
||||||
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
||||||
t.index ["organization_id"], name: "index_versions_on_organization_id"
|
t.index ["organization_id"], name: "index_versions_on_organization_id"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue