Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3487275
D12335.id41072.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
683 B
Referenced Files
None
Subscribers
None
D12335.id41072.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
@@ -381,6 +381,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)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 7:30 AM (1 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2675894
Default Alt Text
D12335.id41072.diff (683 B)
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