api: replace auth_id with auth-id
in parameters, and fix up the completion for the ACL update parameter. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
e4e280183e
commit
8b600f9965
@ -244,7 +244,7 @@ fn change_password(
|
|||||||
#[api(
|
#[api(
|
||||||
input: {
|
input: {
|
||||||
properties: {
|
properties: {
|
||||||
auth_id: {
|
"auth-id": {
|
||||||
type: Authid,
|
type: Authid,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
@ -169,7 +169,7 @@ pub fn read_acl(
|
|||||||
optional: true,
|
optional: true,
|
||||||
schema: ACL_PROPAGATE_SCHEMA,
|
schema: ACL_PROPAGATE_SCHEMA,
|
||||||
},
|
},
|
||||||
auth_id: {
|
"auth-id": {
|
||||||
optional: true,
|
optional: true,
|
||||||
type: Authid,
|
type: Authid,
|
||||||
},
|
},
|
||||||
|
@ -60,7 +60,7 @@ pub fn acl_commands() -> CommandLineInterface {
|
|||||||
"update",
|
"update",
|
||||||
CliCommand::new(&api2::access::acl::API_METHOD_UPDATE_ACL)
|
CliCommand::new(&api2::access::acl::API_METHOD_UPDATE_ACL)
|
||||||
.arg_param(&["path", "role"])
|
.arg_param(&["path", "role"])
|
||||||
.completion_cb("userid", config::user::complete_userid)
|
.completion_cb("auth-id", config::user::complete_authid)
|
||||||
.completion_cb("path", config::datastore::complete_acl_path)
|
.completion_cb("path", config::datastore::complete_acl_path)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -100,7 +100,7 @@ fn list_tokens(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, E
|
|||||||
schema: OUTPUT_FORMAT,
|
schema: OUTPUT_FORMAT,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
auth_id: {
|
"auth-id": {
|
||||||
type: Authid,
|
type: Authid,
|
||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
@ -195,8 +195,8 @@ pub fn user_commands() -> CommandLineInterface {
|
|||||||
.insert(
|
.insert(
|
||||||
"permissions",
|
"permissions",
|
||||||
CliCommand::new(&&API_METHOD_LIST_PERMISSIONS)
|
CliCommand::new(&&API_METHOD_LIST_PERMISSIONS)
|
||||||
.arg_param(&["auth_id"])
|
.arg_param(&["auth-id"])
|
||||||
.completion_cb("auth_id", config::user::complete_authid)
|
.completion_cb("auth-id", config::user::complete_authid)
|
||||||
.completion_cb("path", config::datastore::complete_acl_path)
|
.completion_cb("path", config::datastore::complete_acl_path)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ Ext.define('PBS.config.ACLView', {
|
|||||||
'delete': 1,
|
'delete': 1,
|
||||||
path: rec.data.path,
|
path: rec.data.path,
|
||||||
role: rec.data.roleid,
|
role: rec.data.roleid,
|
||||||
auth_id: rec.data.ugid,
|
'auth-id': rec.data.ugid,
|
||||||
},
|
},
|
||||||
callback: function() {
|
callback: function() {
|
||||||
me.reload();
|
me.reload();
|
||||||
|
@ -109,7 +109,7 @@ Ext.define('PBS.config.TokenView', {
|
|||||||
|
|
||||||
Ext.create('Proxmox.PermissionView', {
|
Ext.create('Proxmox.PermissionView', {
|
||||||
auth_id: selection[0].data.tokenid,
|
auth_id: selection[0].data.tokenid,
|
||||||
auth_id_name: 'auth_id',
|
auth_id_name: 'auth-id',
|
||||||
}).show();
|
}).show();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ Ext.define('PBS.config.UserView', {
|
|||||||
|
|
||||||
Ext.create('Proxmox.PermissionView', {
|
Ext.create('Proxmox.PermissionView', {
|
||||||
auth_id: selection[0].data.userid,
|
auth_id: selection[0].data.userid,
|
||||||
auth_id_name: 'auth_id',
|
auth_id_name: 'auth-id',
|
||||||
}).show();
|
}).show();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ Ext.define('PBS.window.ACLEdit', {
|
|||||||
me.items.push({
|
me.items.push({
|
||||||
xtype: 'pbsUserSelector',
|
xtype: 'pbsUserSelector',
|
||||||
fieldLabel: gettext('User'),
|
fieldLabel: gettext('User'),
|
||||||
name: 'auth_id',
|
name: 'auth-id',
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
});
|
});
|
||||||
} else if (me.aclType === 'token') {
|
} else if (me.aclType === 'token') {
|
||||||
@ -41,7 +41,7 @@ Ext.define('PBS.window.ACLEdit', {
|
|||||||
me.items.push({
|
me.items.push({
|
||||||
xtype: 'pbsTokenSelector',
|
xtype: 'pbsTokenSelector',
|
||||||
fieldLabel: gettext('API Token'),
|
fieldLabel: gettext('API Token'),
|
||||||
name: 'auth_id',
|
name: 'auth-id',
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user