[pbs-devel] [PATCH proxmox-backup 1/2] api: replace auth_id with auth-id
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Oct 30 15:18:41 CET 2020
in parameters, and fix up the completion for the ACL update parameter.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
src/api2/access.rs | 2 +-
src/api2/access/acl.rs | 2 +-
src/bin/proxmox_backup_manager/acl.rs | 2 +-
src/bin/proxmox_backup_manager/user.rs | 6 +++---
www/config/ACLView.js | 2 +-
www/config/TokenView.js | 2 +-
www/config/UserView.js | 2 +-
www/window/ACLEdit.js | 4 ++--
8 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/api2/access.rs b/src/api2/access.rs
index 5e74a6ee..9b9e85c0 100644
--- a/src/api2/access.rs
+++ b/src/api2/access.rs
@@ -244,7 +244,7 @@ fn change_password(
#[api(
input: {
properties: {
- auth_id: {
+ "auth-id": {
type: Authid,
optional: true,
},
diff --git a/src/api2/access/acl.rs b/src/api2/access/acl.rs
index a776ceaa..ff9da466 100644
--- a/src/api2/access/acl.rs
+++ b/src/api2/access/acl.rs
@@ -169,7 +169,7 @@ pub fn read_acl(
optional: true,
schema: ACL_PROPAGATE_SCHEMA,
},
- auth_id: {
+ "auth-id": {
optional: true,
type: Authid,
},
diff --git a/src/bin/proxmox_backup_manager/acl.rs b/src/bin/proxmox_backup_manager/acl.rs
index 3fbb3bcb..7511c8cb 100644
--- a/src/bin/proxmox_backup_manager/acl.rs
+++ b/src/bin/proxmox_backup_manager/acl.rs
@@ -60,7 +60,7 @@ pub fn acl_commands() -> CommandLineInterface {
"update",
CliCommand::new(&api2::access::acl::API_METHOD_UPDATE_ACL)
.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)
);
diff --git a/src/bin/proxmox_backup_manager/user.rs b/src/bin/proxmox_backup_manager/user.rs
index b1887f4e..516d27f2 100644
--- a/src/bin/proxmox_backup_manager/user.rs
+++ b/src/bin/proxmox_backup_manager/user.rs
@@ -100,7 +100,7 @@ fn list_tokens(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, E
schema: OUTPUT_FORMAT,
optional: true,
},
- auth_id: {
+ "auth-id": {
type: Authid,
},
path: {
@@ -195,8 +195,8 @@ pub fn user_commands() -> CommandLineInterface {
.insert(
"permissions",
CliCommand::new(&&API_METHOD_LIST_PERMISSIONS)
- .arg_param(&["auth_id"])
- .completion_cb("auth_id", config::user::complete_authid)
+ .arg_param(&["auth-id"])
+ .completion_cb("auth-id", config::user::complete_authid)
.completion_cb("path", config::datastore::complete_acl_path)
);
diff --git a/www/config/ACLView.js b/www/config/ACLView.js
index 67bf04f8..73edf858 100644
--- a/www/config/ACLView.js
+++ b/www/config/ACLView.js
@@ -69,7 +69,7 @@ Ext.define('PBS.config.ACLView', {
'delete': 1,
path: rec.data.path,
role: rec.data.roleid,
- auth_id: rec.data.ugid,
+ 'auth-id': rec.data.ugid,
},
callback: function() {
me.reload();
diff --git a/www/config/TokenView.js b/www/config/TokenView.js
index 88b3f194..2225d6c5 100644
--- a/www/config/TokenView.js
+++ b/www/config/TokenView.js
@@ -109,7 +109,7 @@ Ext.define('PBS.config.TokenView', {
Ext.create('Proxmox.PermissionView', {
auth_id: selection[0].data.tokenid,
- auth_id_name: 'auth_id',
+ auth_id_name: 'auth-id',
}).show();
},
diff --git a/www/config/UserView.js b/www/config/UserView.js
index eed96514..c2556b97 100644
--- a/www/config/UserView.js
+++ b/www/config/UserView.js
@@ -72,7 +72,7 @@ Ext.define('PBS.config.UserView', {
Ext.create('Proxmox.PermissionView', {
auth_id: selection[0].data.userid,
- auth_id_name: 'auth_id',
+ auth_id_name: 'auth-id',
}).show();
},
diff --git a/www/window/ACLEdit.js b/www/window/ACLEdit.js
index 42db1ff6..9ac5884f 100644
--- a/www/window/ACLEdit.js
+++ b/www/window/ACLEdit.js
@@ -33,7 +33,7 @@ Ext.define('PBS.window.ACLEdit', {
me.items.push({
xtype: 'pbsUserSelector',
fieldLabel: gettext('User'),
- name: 'auth_id',
+ name: 'auth-id',
allowBlank: false,
});
} else if (me.aclType === 'token') {
@@ -41,7 +41,7 @@ Ext.define('PBS.window.ACLEdit', {
me.items.push({
xtype: 'pbsTokenSelector',
fieldLabel: gettext('API Token'),
- name: 'auth_id',
+ name: 'auth-id',
allowBlank: false,
});
}
--
2.20.1
More information about the pbs-devel
mailing list