backend-manager 3.0.27 → 3.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -20,8 +20,10 @@ Module.prototype.main = function () {
|
|
|
20
20
|
// payload.response.error = new Error(`Failed to delete user: There is an active paid subscription on this account. Please cancel it first and then try deleting the account again.`);
|
|
21
21
|
// return reject(payload.response.error);
|
|
22
22
|
// }
|
|
23
|
+
|
|
24
|
+
// Disallow deleting users with subscriptions in any state other than cancelled or active payments
|
|
23
25
|
if (
|
|
24
|
-
user?.plan
|
|
26
|
+
(user?.plan?.status && user?.plan?.status !== 'cancelled')
|
|
25
27
|
|| user?.plan?.payment?.active
|
|
26
28
|
) {
|
|
27
29
|
// return reject(assistant.errorManager(`Failed to delete user: There is an active paid subscription on this account. Please cancel it first and then try deleting the account again.`, {code: 400, sentry: false, send: false, log: false}).error)
|