-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(users): add support for profile user delete #5541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
0aee7a6
5aa44b5
a1fcd39
d4c670d
0a528e4
a70447a
00574de
e2c8f10
df3035a
91cb0d6
908ee8f
820b02d
977252e
a87358c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2645,25 +2645,50 @@ impl UserRoleInterface for KafkaStore { | |||||
.await | ||||||
} | ||||||
|
||||||
async fn delete_user_role_by_user_id_merchant_id( | ||||||
async fn list_user_roles_by_user_id( | ||||||
&self, | ||||||
user_id: &str, | ||||||
merchant_id: &id_type::MerchantId, | ||||||
version: enums::UserRoleVersion, | ||||||
) -> CustomResult<user_storage::UserRole, errors::StorageError> { | ||||||
) -> CustomResult<Vec<user_storage::UserRole>, errors::StorageError> { | ||||||
self.diesel_store | ||||||
.delete_user_role_by_user_id_merchant_id(user_id, merchant_id, version) | ||||||
.list_user_roles_by_user_id(user_id, version) | ||||||
.await | ||||||
} | ||||||
|
||||||
async fn list_user_roles_by_user_id( | ||||||
async fn find_user_role_by_user_id_and_lineage( | ||||||
&self, | ||||||
user_id: &str, | ||||||
org_id: &id_type::OrganizationId, | ||||||
merchant_id: &id_type::MerchantId, | ||||||
profile_id: Option<&String>, | ||||||
version: enums::UserRoleVersion, | ||||||
) -> CustomResult<Vec<user_storage::UserRole>, errors::StorageError> { | ||||||
self.diesel_store | ||||||
.list_user_roles_by_user_id(user_id, version) | ||||||
.await | ||||||
) -> CustomResult<storage::UserRole, errors::StorageError> { | ||||||
self.find_user_role_by_user_id_and_lineage( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In kakfaStore if we can self.functions will causes stack_overflow. So avoid following that. |
||||||
user_id, | ||||||
org_id, | ||||||
merchant_id, | ||||||
profile_id, | ||||||
version, | ||||||
) | ||||||
.await | ||||||
} | ||||||
|
||||||
async fn delete_user_role_by_user_id_and_lineage( | ||||||
&self, | ||||||
user_id: &str, | ||||||
org_id: &id_type::OrganizationId, | ||||||
merchant_id: &id_type::MerchantId, | ||||||
profile_id: Option<&String>, | ||||||
version: enums::UserRoleVersion, | ||||||
) -> CustomResult<storage::UserRole, errors::StorageError> { | ||||||
self.delete_user_role_by_user_id_and_lineage( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In kakfaStore if we can self.functions will causes stack_overflow. So avoid following that. |
||||||
user_id, | ||||||
org_id, | ||||||
merchant_id, | ||||||
profile_id, | ||||||
version, | ||||||
) | ||||||
.await | ||||||
} | ||||||
|
||||||
async fn transfer_org_ownership_between_users( | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
500
is not handled.