mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Require an auth token to use snapshots
This commit is contained in:
parent
fe65d5b11b
commit
1689133b19
2 changed files with 66 additions and 0 deletions
|
|
@ -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 }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue