-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[payment] cancel all subscriptions on user deletion #4501
Conversation
677e5dd
to
06e2f33
Compare
06e2f33
to
f5ff1c8
Compare
Looks like we won't get a preview environment for these kind of changes in the near future. Please review such that we can test it on staging, |
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.
2 smaller comments or rather questions because I don't understand team subscriptions well enough.
const teamSlots = await this.teamSubscriptionService.findTeamSubscriptionSlotsByAssignee(id); | ||
teamSlots.forEach(async ts => await this.teamSubscriptionService.deactivateSlot(ts.teamSubscriptionId, ts.id, now)) |
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.
Could teamSlots
be empty (expectedly or unexpectedly)? Do we need to handle this (logging/throwing an error etc.)?
Co-authored-by: Cornelius A. Ludmann <[email protected]>
return super.deleteUser(id); | ||
await super.deleteUser(id); | ||
if (errors) { | ||
throw new Error(errors.join("\n")) |
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.
why throwing the errors here? We still deleted the user and already logged any errors.
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.
The idea was to give feedback to the caller, e.g. the admin dashboard.
In particular in the case of GitHub subscription, it may be worthwhile to notify the customer that their subscription will still be charged as we have no means to cancel it.
LGTM label has been added. Git tree hash: 42ac6fcc6c88268a670da9bd7992049d64369590
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JanKoehnlein, svenefftinge Associated issue: #4229 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@svenefftinge Thanks a lot for the review! |
fixes #4229