]> git.proxmox.com Git - pve-access-control.git/commitdiff
Add title and print_width fields to properties
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 21 Jun 2018 12:31:46 +0000 (14:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Jun 2018 14:40:55 +0000 (16:40 +0200)
Used for printing in pveum

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PVE/API2/ACL.pm
PVE/API2/Group.pm
PVE/API2/Role.pm
PVE/API2/User.pm
PVE/Auth/Plugin.pm

index 3e42ac06d8a9a85131a00fc62b6a02997689203d..866e0237459541ad6c9b246c1cd12eb22f27d21d 100644 (file)
@@ -17,11 +17,13 @@ use base qw(PVE::RESTHandler);
 register_standard_option('acl-propagate', {
     description => "Allow to propagate (inherit) permissions.",
     type => 'boolean',
+    title => 'Propagate',
     optional => 1,
     default => 1,
 });
 register_standard_option('acl-path', {
     description => "Access control path",
+    title => 'Path',
     type => 'string',
 });
 
@@ -46,9 +48,9 @@ __PACKAGE__->register_method ({
            properties => {
                propagate => get_standard_option('acl-propagate'),
                path => get_standard_option('acl-path'),
-               type => { type => 'string', enum => ['user', 'group'] },
-               ugid => { type => 'string' },
-               roleid => { type => 'string' },
+               type => { type => 'string', title => 'Type', enum => ['user', 'group'] },
+               ugid => { type => 'string', title => 'ID' },
+               roleid => { type => 'string', title => 'Role' },
            },
        },
     },
index 37f8be24645e204e11dc012d1feb798ac8184cd1..1d6ba98bf605da4a3004bb9aae850358d1af7bd3 100644 (file)
@@ -13,6 +13,7 @@ use base qw(PVE::RESTHandler);
 register_standard_option('group-id', {
     type => 'string',
     format => 'pve-groupid',
+    title => 'Group ID' ,
     completion => \&PVE::AccessControl::complete_group,
 });
 
index 80959b0a26d65d8eedac8aa070ecac05a8b18f48..156d3b89bc4015060ae851bd180bd10a7ce2c394 100644 (file)
@@ -15,11 +15,13 @@ 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,
+    optional => 1, title => 'Privileges',
 });
 
 __PACKAGE__->register_method ({
@@ -41,7 +43,7 @@ __PACKAGE__->register_method ({
            properties => {
                roleid => get_standard_option('role-id'),
                privs =>  get_standard_option('role-privs'),
-               special => { type => 'boolean', optional => 1, default => 0 },
+               special => { type => 'boolean', optional => 1, default => 0, title => 'Built-In' },
            },
        },
        links => [ { rel => 'child', href => "{roleid}" } ],
index 4c859dc2e66081055a3450528a9a52729081d1e6..89c83430165e1ce84b2dbe051b48cae0c8c06d63 100644 (file)
@@ -15,6 +15,7 @@ use PVE::RESTHandler;
 use base qw(PVE::RESTHandler);
 
 register_standard_option('user-enable', {
+    title => "Enable",
     description => "Enable the account (default). You can set this to '0' to disable the account",
     type => 'boolean',
     optional => 1,
index d5d2c06971357b57bd15937f4a641608efbfe958..0bffa2b123144a415c0beb2d724190dcd014598e 100755 (executable)
@@ -76,7 +76,7 @@ sub verify_username {
 }
 
 PVE::JSONSchema::register_standard_option('userid', {
-    description => "User ID",
+    description => "User ID", title => "User ID",
     type => 'string', format => 'pve-userid',
     maxLength => 64,
 });