Rename "Organization" to "Team" across web app and update related services
Renamed all instances of "Organization" with "Team" across the entire web application to reflect the latest change in terminology. This further extends to renaming related services, components, and their respective invocation instances. Separate billing permissions have been defined for Team accounts, and security actions have been updated in SQL schema along with some layout adjustments.
This commit is contained in:
@@ -35,25 +35,30 @@ export class DeletePersonalAccountService {
|
||||
productName: string;
|
||||
};
|
||||
}) {
|
||||
const userId = params.userId;
|
||||
|
||||
Logger.info(
|
||||
{ userId: params.userId, name: this.namespace },
|
||||
{ name: this.namespace, userId },
|
||||
'User requested deletion. Processing...',
|
||||
);
|
||||
|
||||
// Cancel all user subscriptions
|
||||
const billingService = new AccountBillingService(params.adminClient);
|
||||
|
||||
await billingService.cancelAllAccountSubscriptions(params.userId);
|
||||
await billingService.cancelAllAccountSubscriptions({
|
||||
userId,
|
||||
accountId: userId,
|
||||
});
|
||||
|
||||
// execute the deletion of the user
|
||||
try {
|
||||
await params.adminClient.auth.admin.deleteUser(params.userId);
|
||||
await params.adminClient.auth.admin.deleteUser(userId);
|
||||
} catch (error) {
|
||||
Logger.error(
|
||||
{
|
||||
userId: params.userId,
|
||||
error,
|
||||
name: this.namespace,
|
||||
userId,
|
||||
error,
|
||||
},
|
||||
'Error deleting user',
|
||||
);
|
||||
@@ -66,8 +71,8 @@ export class DeletePersonalAccountService {
|
||||
try {
|
||||
Logger.info(
|
||||
{
|
||||
userId: params.userId,
|
||||
name: this.namespace,
|
||||
userId,
|
||||
},
|
||||
`Sending account deletion email...`,
|
||||
);
|
||||
@@ -81,8 +86,8 @@ export class DeletePersonalAccountService {
|
||||
} catch (error) {
|
||||
Logger.error(
|
||||
{
|
||||
userId: params.userId,
|
||||
name: this.namespace,
|
||||
userId,
|
||||
error,
|
||||
},
|
||||
`Error sending account deletion email`,
|
||||
|
||||
Reference in New Issue
Block a user