mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-06-12 09:58:36 +00:00
Add title and print_width fields to properties
Used for printing in pveum Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
3a5ae7a0e6
commit
bcf4eb3d49
@ -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' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -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,
|
||||
});
|
||||
|
||||
|
@ -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}" } ],
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user