X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=PVE%2FAPI2%2FRole.pm;h=6392e133a2bd673dcc96072c11f0a8ded689073f;hp=396ba488f8684994272dd63031ff52249eb13262;hb=854f1dceb6f1bb733518a8a77df670768d9f5392;hpb=2c3a6c0aaac7fbdaeb26bc5a596d21e897f3343a diff --git a/PVE/API2/Role.pm b/PVE/API2/Role.pm index 396ba48..6392e13 100644 --- a/PVE/API2/Role.pm +++ b/PVE/API2/Role.pm @@ -18,6 +18,9 @@ __PACKAGE__->register_method ({ path => '', method => 'GET', description => "Role index.", + permissions => { + user => 'all', + }, parameters => { additionalProperties => 0, properties => {}, @@ -52,6 +55,9 @@ __PACKAGE__->register_method ({ protected => 1, path => '', method => 'POST', + permissions => { + check => ['perm', '/access', ['Sys.Modify']], + }, description => "Create new role.", parameters => { additionalProperties => 0, @@ -89,6 +95,9 @@ __PACKAGE__->register_method ({ protected => 1, path => '{roleid}', method => 'PUT', + permissions => { + check => ['perm', '/access', ['Sys.Modify']], + }, description => "Create new role.", parameters => { additionalProperties => 0, @@ -131,6 +140,9 @@ __PACKAGE__->register_method ({ name => 'read_role', path => '{roleid}', method => 'GET', + permissions => { + user => 'all', + }, description => "Get role configuration.", parameters => { additionalProperties => 0, @@ -159,6 +171,9 @@ __PACKAGE__->register_method ({ protected => 1, path => '{roleid}', method => 'DELETE', + permissions => { + check => ['perm', '/access', ['Sys.Modify']], + }, description => "Delete role.", parameters => { additionalProperties => 0,