Remove Person from product catalog

Early versions of the DFC standard demanded that all data is published
in relationship to the authenticated user. But that is not necessary
anymore and can add complications when a platform is authenticated as
client user.
This commit is contained in:
Maikel Linke
2025-08-07 14:53:33 +10:00
parent d469552afc
commit 1ec570375f
2 changed files with 0 additions and 7 deletions

View File

@@ -7,16 +7,12 @@ module DfcProvider
before_action :check_enterprise
def index
person = PersonBuilder.person(current_user)
enterprises = current_user.enterprises.map do |enterprise|
EnterpriseBuilder.enterprise(enterprise)
end
person.affiliatedOrganizations = enterprises
catalog_items = enterprises.flat_map(&:catalogItems)
render json: DfcIo.export(
person,
*enterprises,
*catalog_items,
*catalog_items.map(&:product),

View File

@@ -151,9 +151,6 @@ paths:
value:
"@context": https://www.datafoodconsortium.org
"@graph":
- "@id": http://test.host/api/dfc/persons/12345
"@type": dfc-b:Person
dfc-b:affiliates: http://test.host/api/dfc/enterprises/10000
- "@id": http://test.host/api/dfc/enterprises/10000
"@type": dfc-b:Enterprise
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000