-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIN 5558 - Get eservice descriptor #1218
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -92,7 +92,7 @@ export function toBffCatalogDescriptorEService( | |||||||||||||||||||||||||||
descriptor: catalogApi.EServiceDescriptor, | ||||||||||||||||||||||||||||
producerTenant: tenantApi.Tenant, | ||||||||||||||||||||||||||||
agreement: agreementApi.Agreement | undefined, | ||||||||||||||||||||||||||||
requesterTenant: tenantApi.Tenant | ||||||||||||||||||||||||||||
requesterTenants: tenantApi.Tenant[] | ||||||||||||||||||||||||||||
): bffApi.CatalogDescriptorEService { | ||||||||||||||||||||||||||||
const activeDescriptor = getLatestActiveDescriptor(eservice); | ||||||||||||||||||||||||||||
return { | ||||||||||||||||||||||||||||
|
@@ -107,8 +107,12 @@ export function toBffCatalogDescriptorEService( | |||||||||||||||||||||||||||
technology: eservice.technology, | ||||||||||||||||||||||||||||
descriptors: getNotDraftDescriptor(eservice).map(toCompactDescriptor), | ||||||||||||||||||||||||||||
agreement: agreement && toBffCompactAgreement(agreement, eservice), | ||||||||||||||||||||||||||||
isMine: isRequesterEserviceProducer(requesterTenant.id, eservice), | ||||||||||||||||||||||||||||
hasCertifiedAttributes: hasCertifiedAttributes(descriptor, requesterTenant), | ||||||||||||||||||||||||||||
isMine: requesterTenants.some((t) => | ||||||||||||||||||||||||||||
isRequesterEserviceProducer(t.id, eservice) | ||||||||||||||||||||||||||||
), | ||||||||||||||||||||||||||||
hasCertifiedAttributes: requesterTenants.some((t) => | ||||||||||||||||||||||||||||
hasCertifiedAttributes(descriptor, t) | ||||||||||||||||||||||||||||
), | ||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I would also add a comment to explain why
Suggested change
|
||||||||||||||||||||||||||||
isSubscribed: isAgreementSubscribed(agreement), | ||||||||||||||||||||||||||||
activeDescriptor: activeDescriptor | ||||||||||||||||||||||||||||
? toCompactDescriptor(activeDescriptor) | ||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment below: since isMine should probably consider only the requester, while hasCertifiedAttributes should consider the requester and the consumer delegators, we can split the two params here