]> git.proxmox.com Git - pve-access-control.git/blobdiff - PVE/API2/Role.pm
add SDN.Allocate && SDN.Audit privileges
[pve-access-control.git] / PVE / API2 / Role.pm
index 156d3b89bc4015060ae851bd180bd10a7ce2c394..83e4a9d4a9ab20b1efce78c4b433f6db3e0f72d2 100644 (file)
@@ -15,13 +15,11 @@ use base qw(PVE::RESTHandler);
 register_standard_option('role-id', {
     type => 'string',
     format => 'pve-roleid',
-    title => 'Role ID',
-    print_width => 30
 });
 register_standard_option('role-privs', {
     type => 'string' ,
     format => 'pve-priv-list',
-    optional => 1, title => 'Privileges',
+    optional => 1,
 });
 
 __PACKAGE__->register_method ({
@@ -43,7 +41,7 @@ __PACKAGE__->register_method ({
            properties => {
                roleid => get_standard_option('role-id'),
                privs =>  get_standard_option('role-privs'),
-               special => { type => 'boolean', optional => 1, default => 0, title => 'Built-In' },
+               special => { type => 'boolean', optional => 1, default => 0 },
            },
        },
        links => [ { rel => 'child', href => "{roleid}" } ],
@@ -165,9 +163,7 @@ __PACKAGE__->register_method ({
     returns => {
        type => "object",
        additionalProperties => 0,
-       properties => {
-           privs =>  get_standard_option('role-privs'),
-       },
+       properties => PVE::AccessControl::create_priv_properties(),
     },
     code => sub {
        my ($param) = @_;