Skip to content

Commit

Permalink
fix(app): change appInstanceId to iamClientId for provider endpoint (#…
Browse files Browse the repository at this point in the history
…158)

Refs: CPLP-2983
Reviewed-By: Norbert Truchsess <[email protected]>
  • Loading branch information
Phil91 authored Jul 28, 2023
1 parent fef1c2c commit c522032
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public record AppProviderSubscriptionDetailData(
IEnumerable<string> Contact,
IEnumerable<SubscriptionTechnicalUserData> TechnicalUserData,
string? TenantUrl,
Guid? AppInstanceId
string AppInstanceId
);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ public OfferSubscription AttachAndModifyOfferSubscription(Guid offerSubscription
x.Subscription.Offer!.Name,
x.Company!.Name,
x.Company.BusinessPartnerNumber,
x.Company.Identities.Where(x => x.IdentityTypeId == IdentityTypeId.COMPANY_USER).Select(i => i.CompanyUser!).Where(cu => cu.Email != null && cu.Identity!.IdentityAssignedRoles.Select(ur => ur.UserRole!).Any(ur => userRoleIds.Contains(ur.Id))).Select(cu => cu.Email!),
x.Company.Identities.Where(i => i.IdentityTypeId == IdentityTypeId.COMPANY_USER).Select(id => id.CompanyUser!).Where(cu => cu.Email != null && cu.Identity!.IdentityAssignedRoles.Select(ur => ur.UserRole!).Any(ur => userRoleIds.Contains(ur.Id))).Select(cu => cu.Email!),
x.Subscription.CompanyServiceAccounts.Select(sa => new SubscriptionTechnicalUserData(sa.Id, sa.Name, sa.Identity!.IdentityAssignedRoles.Select(ur => ur.UserRole!).Select(ur => ur.UserRoleText))),
x.Subscription.AppSubscriptionDetail!.AppSubscriptionUrl,
x.Subscription.AppSubscriptionDetail!.AppInstanceId)
x.Subscription.AppSubscriptionDetail!.AppInstance!.IamClient!.ClientClientId)
: null))
.SingleOrDefaultAsync();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public async Task GetAppSubscriptionDetailForProviderAsync_ReturnsExpected()
x.Contact.SequenceEqual(new[] { "[email protected]" }) &&
x.OfferSubscriptionStatus == OfferSubscriptionStatusId.ACTIVE &&
x.TenantUrl == "https://ec-qas.d13fe27.kyma.ondemand.com" &&
x.AppInstanceId == new Guid("ab25c218-9ab3-4f1a-b6f4-6394fbc33c5b"));
x.AppInstanceId == "https://catenax-int-dismantler-s66pftcc.authentication.eu10.hana.ondemand.com");
}

[Fact]
Expand Down

0 comments on commit c522032

Please sign in to comment.