Skip to content

Commit

Permalink
Remove new unauthorized accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
futa-ikeda committed Nov 6, 2024
1 parent b6b68f6 commit 7a88e81
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,20 @@ export default class AddonAccountSetupComponent extends Component<Args> {
return [
{
name: 'access_token',
labelText: t('addons.accountCreate.api-token-label') ,
labelText: t('addons.accountCreate.api-token-label'),
inputType: 'text',
inputPlaceholder: t('addons.accountCreate.api-token-placeholder'),
inputPlaceholder: t('addons.accountCreate.api-token-placeholder'),
inputValue: credentials.access_token,
},
];
}
case CredentialsFormat.DATAVERSE_API_TOKEN:{
case CredentialsFormat.DATAVERSE_API_TOKEN: {
return [
{
name: 'access_token',
labelText: t('addons.accountCreate.personal-access-token-label'),
inputType: 'text',
inputPlaceholder: t('addons.accountCreate.personal-access-token-placeholder'),
inputPlaceholder: t('addons.accountCreate.personal-access-token-placeholder'),
inputValue: credentials.access_token,
},
];
Expand Down Expand Up @@ -283,4 +283,11 @@ export default class AddonAccountSetupComponent extends Component<Args> {
}
}
}

willDestroy() {
if (!this.args.account && this.newAccount && !this.newAccount.credentialsAvailable) {
this.newAccount.deleteRecord();
this.newAccount.save();
}
}
}

0 comments on commit 7a88e81

Please sign in to comment.