FEATURE: further restrict downloading of backups

- send email to logged in admin when they press the "download" button
- show pop-up that email was sent
- create email template
- require a valid token to download backup
This commit is contained in:
Blake Erickson
2017-03-01 08:26:18 -07:00
parent b20b568039
commit 80858bae2c
10 changed files with 175 additions and 30 deletions

View File

@ -232,6 +232,7 @@ Discourse::Application.routes.draw do
resources :backups, only: [:index, :create], constraints: AdminConstraint.new do
member do
get "" => "backups#show", constraints: { id: BACKUP_ROUTE_FORMAT }
put "" => "backups#email", constraints: { id: BACKUP_ROUTE_FORMAT }
delete "" => "backups#destroy", constraints: { id: BACKUP_ROUTE_FORMAT }
post "restore" => "backups#restore", constraints: { id: BACKUP_ROUTE_FORMAT }
end