Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove unused Space account user id

Neeraj Guptaac1c09b07d05
diff --git a/rust/bindings/wasm/ente-wasm/src/space.rs b/rust/bindings/wasm/ente-wasm/src/space.rs
index c435a9a246..bab3be7a5b 100644
--- a/rust/bindings/wasm/ente-wasm/src/space.rs
+++ b/rust/bindings/wasm/ente-wasm/src/space.rs
@@ -85,7 +85,6 @@ struct OpenAccountSpaceCtxJsInput {
base_url: String,
space_session_token: Option<String>,
space_root_key_b64: String,
- user_id: Option<i64>,
user_agent: Option<String>,
client_package: Option<String>,
client_version: Option<String>,
@@ -519,7 +518,6 @@ pub async fn space_open_account_ctx(
base_url: input.base_url.clone(),
space_session_token: input.space_session_token,
space_root_key,
- user_id: input.user_id,
user_agent: input.user_agent.clone(),
client_package: input.client_package.clone(),
client_version: input.client_version.clone(),
diff --git a/rust/e2e/tests/support/space.rs b/rust/e2e/tests/support/space.rs
index 84de457060..5a85169d01 100644
--- a/rust/e2e/tests/support/space.rs
+++ b/rust/e2e/tests/support/space.rs
@@ -36,7 +36,6 @@ pub async fn open_ctx(endpoint: &str, account: &TestAccount) -> AccountSpaceCtx
master_key: account.master_key.clone(),
public_key: account.public_key.clone(),
private_key_source: PrivateKeySource::Plain(account.secret_key.clone()),
- user_id: Some(account.user_id),
user_agent: Some("ente-e2e".to_string()),
client_package: Some(App::Photos.client_package().to_string()),
client_version: Some("ente-e2e".to_string()),
diff --git a/rust/space/src/client/mod.rs b/rust/space/src/client/mod.rs
index bb34af7d06..7ce8033be0 100644
--- a/rust/space/src/client/mod.rs
+++ b/rust/space/src/client/mod.rs
@@ -91,7 +91,6 @@ pub(crate) struct SpaceIdentity {
pub struct AccountSpaceCtx {
client: HttpClient,
space_root_key: Vec<u8>,
- user_id: Option<i64>,
space_root_key_cache: Mutex<Option<Option<Vec<u8>>>>,
space_identity_cache: Mutex<BTreeMap<String, SpaceIdentity>>,
owned_spaces_cache: Mutex<Option<Vec<SpaceKeyResponse>>>,
@@ -122,7 +121,6 @@ impl AccountSpaceCtx {
Ok(Self {
client,
space_root_key: input.space_root_key,
- user_id: input.user_id,
space_root_key_cache: Mutex::new(None),
space_identity_cache: Mutex::new(BTreeMap::new()),
owned_spaces_cache: Mutex::new(None),
@@ -134,10 +132,6 @@ impl AccountSpaceCtx {
&self.client
}
- pub fn user_id(&self) -> Option<i64> {
- self.user_id
- }
-
pub fn space_root_key(&self) -> &[u8] {
&self.space_root_key
}
diff --git a/rust/space/src/client/test_support.rs b/rust/space/src/client/test_support.rs
index 0997c709e2..13e13c9c96 100644
--- a/rust/space/src/client/test_support.rs
+++ b/rust/space/src/client/test_support.rs
@@ -37,7 +37,6 @@ pub(crate) fn test_account_ctx_with_space_root_key(
base_url: base_url.to_owned(),
space_session_token: Some("space-session-token".to_owned()),
space_root_key,
- user_id: Some(1),
user_agent: None,
client_package: None,
client_version: None,
diff --git a/rust/space/src/models.rs b/rust/space/src/models.rs
index ebd3506c0b..f724aad5be 100644
--- a/rust/space/src/models.rs
+++ b/rust/space/src/models.rs
@@ -9,7 +9,6 @@ pub struct OpenAccountSpaceCtxInput {
pub base_url: String,
pub space_session_token: Option<String>,
pub space_root_key: Vec<u8>,
- pub user_id: Option<i64>,
pub user_agent: Option<String>,
pub client_package: Option<String>,
pub client_version: Option<String>,
diff --git a/web/apps/space/src/services/spaceProfile.ts b/web/apps/space/src/services/spaceProfile.ts
index 89d2bf02f6..1a199b5db9 100644
--- a/web/apps/space/src/services/spaceProfile.ts
+++ b/web/apps/space/src/services/spaceProfile.ts
@@ -121,7 +121,6 @@ const currentSpaceContextConfig = async () => {
clientVersion: isDesktop ? desktopAppVersion : undefined,
spaceRootKeyB64,
spaceSessionToken,
- userId: user.id,
},
};
};