mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-06-15 13:40:39 +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', {
|
register_standard_option('acl-propagate', {
|
||||||
description => "Allow to propagate (inherit) permissions.",
|
description => "Allow to propagate (inherit) permissions.",
|
||||||
type => 'boolean',
|
type => 'boolean',
|
||||||
|
title => 'Propagate',
|
||||||
optional => 1,
|
optional => 1,
|
||||||
default => 1,
|
default => 1,
|
||||||
});
|
});
|
||||||
register_standard_option('acl-path', {
|
register_standard_option('acl-path', {
|
||||||
description => "Access control path",
|
description => "Access control path",
|
||||||
|
title => 'Path',
|
||||||
type => 'string',
|
type => 'string',
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -46,9 +48,9 @@ __PACKAGE__->register_method ({
|
|||||||
properties => {
|
properties => {
|
||||||
propagate => get_standard_option('acl-propagate'),
|
propagate => get_standard_option('acl-propagate'),
|
||||||
path => get_standard_option('acl-path'),
|
path => get_standard_option('acl-path'),
|
||||||
type => { type => 'string', enum => ['user', 'group'] },
|
type => { type => 'string', title => 'Type', enum => ['user', 'group'] },
|
||||||
ugid => { type => 'string' },
|
ugid => { type => 'string', title => 'ID' },
|
||||||
roleid => { type => 'string' },
|
roleid => { type => 'string', title => 'Role' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@ use base qw(PVE::RESTHandler);
|
|||||||
register_standard_option('group-id', {
|
register_standard_option('group-id', {
|
||||||
type => 'string',
|
type => 'string',
|
||||||
format => 'pve-groupid',
|
format => 'pve-groupid',
|
||||||
|
title => 'Group ID' ,
|
||||||
completion => \&PVE::AccessControl::complete_group,
|
completion => \&PVE::AccessControl::complete_group,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -15,11 +15,13 @@ use base qw(PVE::RESTHandler);
|
|||||||
register_standard_option('role-id', {
|
register_standard_option('role-id', {
|
||||||
type => 'string',
|
type => 'string',
|
||||||
format => 'pve-roleid',
|
format => 'pve-roleid',
|
||||||
|
title => 'Role ID',
|
||||||
|
print_width => 30
|
||||||
});
|
});
|
||||||
register_standard_option('role-privs', {
|
register_standard_option('role-privs', {
|
||||||
type => 'string' ,
|
type => 'string' ,
|
||||||
format => 'pve-priv-list',
|
format => 'pve-priv-list',
|
||||||
optional => 1,
|
optional => 1, title => 'Privileges',
|
||||||
});
|
});
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
@ -41,7 +43,7 @@ __PACKAGE__->register_method ({
|
|||||||
properties => {
|
properties => {
|
||||||
roleid => get_standard_option('role-id'),
|
roleid => get_standard_option('role-id'),
|
||||||
privs => get_standard_option('role-privs'),
|
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}" } ],
|
links => [ { rel => 'child', href => "{roleid}" } ],
|
||||||
|
@ -15,6 +15,7 @@ use PVE::RESTHandler;
|
|||||||
use base qw(PVE::RESTHandler);
|
use base qw(PVE::RESTHandler);
|
||||||
|
|
||||||
register_standard_option('user-enable', {
|
register_standard_option('user-enable', {
|
||||||
|
title => "Enable",
|
||||||
description => "Enable the account (default). You can set this to '0' to disable the account",
|
description => "Enable the account (default). You can set this to '0' to disable the account",
|
||||||
type => 'boolean',
|
type => 'boolean',
|
||||||
optional => 1,
|
optional => 1,
|
||||||
|
@ -76,7 +76,7 @@ sub verify_username {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PVE::JSONSchema::register_standard_option('userid', {
|
PVE::JSONSchema::register_standard_option('userid', {
|
||||||
description => "User ID",
|
description => "User ID", title => "User ID",
|
||||||
type => 'string', format => 'pve-userid',
|
type => 'string', format => 'pve-userid',
|
||||||
maxLength => 64,
|
maxLength => 64,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user