Require an auth token to use snapshots

This commit is contained in:
Scott Schneider 2015-07-16 10:58:21 -07:00
parent fe65d5b11b
commit 1689133b19
2 changed files with 66 additions and 0 deletions

View file

@ -518,6 +518,8 @@ module Vmpooler
post "#{api_prefix}/vm/:hostname/snapshot/?" do
content_type :json
need_token! if Vmpooler::API.settings.config[:auth]
status 404
result = { 'ok' => false }
@ -541,6 +543,8 @@ module Vmpooler
post "#{api_prefix}/vm/:hostname/snapshot/:snapshot/?" do
content_type :json
need_token! if Vmpooler::API.settings.config[:auth]
status 404
result = { 'ok' => false }