Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3487265
D12335.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12335.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 7:30 AM (1 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2675889
Default Alt Text
D12335.id.diff (1 KB)
Attached To
Mode
D12335: [identity] reintroduce check to make sure only wallet users can call deleteWalletUser RPC
Attached
Detach File
Event Timeline
Log In to Comment