Page MenuHomePhabricator

D12335.diff
No OneTemporary

D12335.diff

diff --git a/services/identity/src/grpc_services/authenticated.rs b/services/identity/src/grpc_services/authenticated.rs
--- a/services/identity/src/grpc_services/authenticated.rs
+++ b/services/identity/src/grpc_services/authenticated.rs
@@ -376,6 +376,16 @@
debug!("Attempting to delete wallet user: {}", user_id);
+ let maybe_username_and_password_file = self
+ .db_client
+ .get_username_and_password_file(&user_id)
+ .await
+ .map_err(handle_db_error)?;
+
+ if maybe_username_and_password_file.is_some() {
+ return Err(tonic::Status::permission_denied("password user"));
+ }
+
self
.db_client
.delete_user(user_id)
diff --git a/web/grpc/identity-service-context-provider.react.js b/web/grpc/identity-service-context-provider.react.js
--- a/web/grpc/identity-service-context-provider.react.js
+++ b/web/grpc/identity-service-context-provider.react.js
@@ -117,8 +117,6 @@
const client = React.useMemo<IdentityServiceClient>(() => {
return {
- deleteWalletUser: proxyMethodToWorker('deleteWalletUser'),
- deletePasswordUser: proxyMethodToWorker('deletePasswordUser'),
logOut: proxyMethodToWorker('logOut'),
logOutSecondaryDevice: proxyMethodToWorker('logOutSecondaryDevice'),
getKeyserverKeys: proxyMethodToWorker('getKeyserverKeys'),

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 7:30 AM (1 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2675889
Default Alt Text
D12335.diff (1 KB)

Event Timeline