[pbs-devel] [PATCH proxmox] rpcenv: rename user to auth_id
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Oct 28 12:36:24 CET 2020
since it does no longer store just a userid, but potentially an API
token identifier as well
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
proxmox/src/api/cli/environment.rs | 10 +++++-----
proxmox/src/api/rpc_environment.rs | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/proxmox/src/api/cli/environment.rs b/proxmox/src/api/cli/environment.rs
index 4831e3f..6085292 100644
--- a/proxmox/src/api/cli/environment.rs
+++ b/proxmox/src/api/cli/environment.rs
@@ -6,7 +6,7 @@ use crate::api::{RpcEnvironment, RpcEnvironmentType};
#[derive(Default)]
pub struct CliEnvironment {
result_attributes: Value,
- user: Option<String>,
+ auth_id: Option<String>,
}
impl CliEnvironment {
@@ -28,11 +28,11 @@ impl RpcEnvironment for CliEnvironment {
RpcEnvironmentType::CLI
}
- fn set_user(&mut self, user: Option<String>) {
- self.user = user;
+ fn set_auth_id(&mut self, auth_id: Option<String>) {
+ self.auth_id = auth_id;
}
- fn get_user(&self) -> Option<String> {
- self.user.clone()
+ fn get_auth_id(&self) -> Option<String> {
+ self.auth_id.clone()
}
}
diff --git a/proxmox/src/api/rpc_environment.rs b/proxmox/src/api/rpc_environment.rs
index 430f3a6..0dc06d9 100644
--- a/proxmox/src/api/rpc_environment.rs
+++ b/proxmox/src/api/rpc_environment.rs
@@ -14,11 +14,11 @@ pub trait RpcEnvironment: std::any::Any + AsAny + Send {
/// The environment type
fn env_type(&self) -> RpcEnvironmentType;
- /// Set user name
- fn set_user(&mut self, user: Option<String>);
+ /// Set authentication id
+ fn set_auth_id(&mut self, user: Option<String>);
- /// Get user name
- fn get_user(&self) -> Option<String>;
+ /// Get authentication id
+ fn get_auth_id(&self) -> Option<String>;
/// Set the client IP, should be re-set if a proxied connection was detected
fn set_client_ip(&mut self, _client_ip: Option<std::net::SocketAddr>) {
--
2.20.1
More information about the pbs-devel
mailing list