Commit 947edbf7 authored by Dietmar Maurer's avatar Dietmar Maurer

add permissions for backup API

parent daab9d52
...@@ -191,6 +191,9 @@ __PACKAGE__->register_method({ ...@@ -191,6 +191,9 @@ __PACKAGE__->register_method({
path => '', path => '',
method => 'GET', method => 'GET',
description => "List vzdump backup schedule.", description => "List vzdump backup schedule.",
permissions => {
check => ['perm', '/', ['Sys.Audit']],
},
parameters => { parameters => {
additionalProperties => 0, additionalProperties => 0,
properties => {}, properties => {},
...@@ -224,6 +227,9 @@ __PACKAGE__->register_method({ ...@@ -224,6 +227,9 @@ __PACKAGE__->register_method({
method => 'POST', method => 'POST',
protected => 1, protected => 1,
description => "Create new vzdump backup job.", description => "Create new vzdump backup job.",
permissions => {
check => ['perm', '/', ['Sys.Modify']],
},
parameters => { parameters => {
additionalProperties => 0, additionalProperties => 0,
properties => PVE::VZDump::json_config_properties({ properties => PVE::VZDump::json_config_properties({
...@@ -266,6 +272,9 @@ __PACKAGE__->register_method({ ...@@ -266,6 +272,9 @@ __PACKAGE__->register_method({
path => '{id}', path => '{id}',
method => 'GET', method => 'GET',
description => "Read vzdump backup job definition.", description => "Read vzdump backup job definition.",
permissions => {
check => ['perm', '/', ['Sys.Audit']],
},
parameters => { parameters => {
additionalProperties => 0, additionalProperties => 0,
properties => { properties => {
...@@ -302,6 +311,9 @@ __PACKAGE__->register_method({ ...@@ -302,6 +311,9 @@ __PACKAGE__->register_method({
path => '{id}', path => '{id}',
method => 'DELETE', method => 'DELETE',
description => "Delete vzdump backup job definition.", description => "Delete vzdump backup job definition.",
permissions => {
check => ['perm', '/', ['Sys.Modify']],
},
protected => 1, protected => 1,
parameters => { parameters => {
additionalProperties => 0, additionalProperties => 0,
...@@ -349,6 +361,9 @@ __PACKAGE__->register_method({ ...@@ -349,6 +361,9 @@ __PACKAGE__->register_method({
method => 'PUT', method => 'PUT',
protected => 1, protected => 1,
description => "Update vzdump backup job definition.", description => "Update vzdump backup job definition.",
permissions => {
check => ['perm', '/', ['Sys.Modify']],
},
parameters => { parameters => {
additionalProperties => 0, additionalProperties => 0,
properties => PVE::VZDump::json_config_properties({ properties => PVE::VZDump::json_config_properties({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment