Skip to content

MODEXPW-638 - Add custom-fields read permission for the order email export - #384

Open
markusweigelt wants to merge 1 commit into
masterfrom
MODEXPW-638
Open

MODEXPW-638 - Add custom-fields read permission for the order email export#384
markusweigelt wants to merge 1 commit into
masterfrom
MODEXPW-638

Conversation

@markusweigelt

Copy link
Copy Markdown
Contributor

MODEXPW-638 - Add custom-fields read permission for the order email export

Purpose

The EDIFACT/CSV order email export renders PO and PO-line custom fields as template tokens (order.customFields.<refId> / orderLine.customFields.<refId>). The values ride along with the records the export already fetches, but the definitions — field names and select-option labels — have to be read from mod-orders-storage's GET /custom-fields, and that call is made
by mod-data-export-worker under the data-export system user.

Approach

  • Added orders-storage.custom-fields.collection.get to src/main/resources/permissions/system-user-permissions.csv, alongside the existing orders-storage.* reads the orders export already relies on.
  • Mirrored it in descriptors/ModuleDescriptor-template.json in all four places the same orders-storage read set is listed:
    • modulePermissions of POST /data-export-spring/jobs
    • modulePermissions of POST /data-export-spring/jobs/send
    • subPermissions of data-export.edifact.orders.create
    • the metadata.user.permissions system-user set
  • Bumped the folio-export-common submodule to pick up the customFields map on the purchase_order, composite_purchase_order and po_line schemas.

Grant the system user orders-storage.custom-fields.collection.get so PO and
PO line custom field values can be fetched for the order email export, and
update folio-export-common to the schemas exposing customFields.
@markusweigelt
markusweigelt requested a review from a team August 6, 2026 17:37
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant