Skip to content

Commit 97b0ee5

Browse files
authored
fix(appflow): allow personal accounts to install enterprise packages (#4681)
1 parent 298a213 commit 97b0ee5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • packages/@ionic/cli/src/lib/integrations/enterprise

packages/@ionic/cli/src/lib/integrations/enterprise/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@ export class Integration extends BaseIntegration<EnterpriseProjectIntegration> {
7676

7777
protected async validatePK(pk: string, appId?: string): Promise<EnterpriseProjectIntegration> {
7878
let key = await this.getPK(pk);
79-
if (!key.org) {
80-
throw new FatalException('No Organization attached to key. Please contact support@ionic.io');
81-
}
8279

8380
if (!key.app || appId) {
81+
if (!key.org) {
82+
// temporary error until we make possible to link the key to an app for personal accounts
83+
throw new FatalException('No App attached to key. Please contact support@ionic.io');
84+
}
8485
if (!appId) {
8586
appId = await this.chooseAppToLink(key.org);
8687
}
@@ -91,7 +92,7 @@ export class Integration extends BaseIntegration<EnterpriseProjectIntegration> {
9192
keyId: key.id,
9293
productKey: key.key,
9394
appId: key.app.id,
94-
orgId: key.org.id,
95+
orgId: key.org ? key.org.id : undefined,
9596
registries: key.registries,
9697
};
9798
}

0 commit comments

Comments
 (0)