You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.1 Add customer to lib/Settings/petstore_register.json's order.properties (type: "string", description: "Nextcloud UID of the user who placed the order (display-only, not an authorization boundary)"), not added to required
1.2 Bump the order schema's version field and the register's version field (0.2.0 → 0.2.1) per the app's existing register-versioning convention (InitializeSettings re-imports on version bump)
2.1 Determine whether orders today are created only via the generic manifest-driven type: "index" create-dialog (OpenRegister direct write, ADR-022) with no app-side hook point — confirmed: no bespoke create endpoint; orders are created via the generic OR write path
2.2 A hook point DOES exist — OpenRegister dispatches a vetoable ObjectCreatingEvent from its central write path (MagicMapper::insertObjectEntity) and merges a listener's setModifiedData() into the object before persisting. Added lib/Listener/OrderCustomerListener.php (registered in Application::register()) that stamps customer from IUserSession, scoped strictly to the petstore/order register+schema (slugs resolved via OR's SchemaMapper/RegisterMapper), never trusting a request-body value, and never throwing (best-effort on a shared instance-wide event)
2.3 N/A — a hook point exists, so 2.2 applies. The field remains display-only: nothing in the app makes an authorization decision based on customer (documented in the listener + spec)
3.1 Add a customer column to the Orders index page config.columns in src/manifest.json
3.2 Add a small cell renderer (src/cellRenderers/UserDisplay.vue, following the StatusBadge.vue pattern) that resolves an NC UID to a display name (cache → current user → OCS cloud/users/{uid})
3.3 Reference the new cell renderer: registered in src/registry.js as a kind: "cell-renderer" with appliesTo: { schema: "order", property: "customer" } — auto-binds to the customer column (matching the existing StatusBadge registry precedent, the idiomatic cell-renderer mechanism)
5.1 Run openspec validate add-order-customer-reference --strict — PASS
5.2 npm run check:manifest — PASS (Ajv validation: 0 errors)
Synced from openspec/changes/add-order-customer-reference by OpenSpec workflow App: app-template
Artifacts
Specs
Tasks
customertolib/Settings/petstore_register.json'sorder.properties(type: "string",description: "Nextcloud UID of the user who placed the order (display-only, not an authorization boundary)"), not added torequiredorderschema'sversionfield and the register'sversionfield (0.2.0 → 0.2.1) per the app's existing register-versioning convention (InitializeSettings re-imports on version bump)type: "index"create-dialog (OpenRegister direct write, ADR-022) with no app-side hook point — confirmed: no bespoke create endpoint; orders are created via the generic OR write pathObjectCreatingEventfrom its central write path (MagicMapper::insertObjectEntity) and merges a listener'ssetModifiedData()into the object before persisting. Addedlib/Listener/OrderCustomerListener.php(registered inApplication::register()) that stampscustomerfromIUserSession, scoped strictly to the petstore/order register+schema (slugs resolved via OR's SchemaMapper/RegisterMapper), never trusting a request-body value, and never throwing (best-effort on a shared instance-wide event)customer(documented in the listener + spec)customercolumn to theOrdersindex pageconfig.columnsinsrc/manifest.jsonsrc/cellRenderers/UserDisplay.vue, following theStatusBadge.vuepattern) that resolves an NC UID to a display name (cache → current user → OCScloud/users/{uid})src/registry.jsas akind: "cell-renderer"withappliesTo: { schema: "order", property: "customer" }— auto-binds to thecustomercolumn (matching the existingStatusBadgeregistry precedent, the idiomatic cell-renderer mechanism)openspec validate add-order-customer-reference --strict— PASSnpm run check:manifest— PASS (Ajv validation: 0 errors)Synced from
openspec/changes/add-order-customer-referenceby OpenSpec workflowApp:
app-template