-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix(emailNotification): Add Multiple Users | Invite email didnt receive by User(s) #922
fix(emailNotification): Add Multiple Users | Invite email didnt receive by User(s) #922
Conversation
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.
My suggestion would be to move the mail process creation into the call of _userProvisioningServiceCreateOwnCompanyIdpUsersAsync
and adjust the usages accordingly.
@Phil91 thanks for your suggestion, I see e.g. in
and in
and in
So I feel like, if I move the mail process creation for |
@tfjanjua sorry for the late response, didn't saw the additional usages. I like the idea, instead of the parameter to define where the call came from I'd suggest to just add a parameter to pass an enumerable of the mail templates? |
userCreationInfos | ||
.Select(info => | ||
{ | ||
userCreationInfo = info; |
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.
I'm not sure this might be causing threading issues. I need to check what the specification says about synchronization and visibility of changes done from an inner Task writing to some outer scoped address that is not defined as AtomicXXX (could be a no-issue, but I'm not 100% sure, I did not yet find information about whether anything else than Task.Result that is not explicitly synchronized and being written to within the Tasks execution is guaranteed to be visible outside)
Also this relies on CreateOwnCompanyIdpUserAsync iterating userCreationInfos sequentially. If someone decides to add parallelism it would break this code.
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.
ok, I just notice this new method is a copy of the existing method CreateOwnCompanyIdpUsersWithEmailAsync with email-generation adjusted to the SharedIdp-usecase. I'll do some reusable refactoring to accomplish this in a less fragile way.
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.
I did refactor this adding a new onSuccess parameter that allows to pass a lambda that is going to be executed after each user-creation. Any db-changes applied within that lambda are being saved within the same transaction as the creation of the respective user now.
(I had to do a force-push after rebasing on latest main to resolve the conflicts)
5a2edaf
to
ca3443f
Compare
…ve by User(s) User(s) didnt receive invite emails when invited via Add Multiple Users. Users has been created but invite email does not sent out to users. Ref: eclipse-tractusx#920
364790d
to
e143220
Compare
e143220
to
52c47f1
Compare
0087e90
to
55308a1
Compare
b08ae20
to
7563111
Compare
7563111
to
ad7a05a
Compare
Quality Gate passedIssues Measures |
Description
User(s) didnt receive invite emails when invited via Add Multiple Users. Users has been created but invite email does not sent out to users.
Why
Recently bulk uploaded users were not getting email notifications
Issue
Ref: #920
Checklist
Please delete options that are not relevant.