public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/2] api: replace auth_id with auth-id
Date: Fri, 30 Oct 2020 15:18:41 +0100	[thread overview]
Message-ID: <20201030141842.1024730-1-f.gruenbichler@proxmox.com> (raw)

in parameters, and fix up the completion for the ACL update parameter.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@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





             reply	other threads:[~2020-10-30 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 14:18 Fabian Grünbichler [this message]
2020-10-30 14:18 ` [pbs-devel] [PATCH proxmox-backup 2/2] docs: add API tokens to documentation Fabian Grünbichler
2020-10-30 16:03   ` [pbs-devel] applied: " Thomas Lamprecht
2020-10-30 16:02 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] api: replace auth_id with auth-id Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030141842.1024730-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal