The store upload (POST /v1/tenants/{id}/store/documents) accepts the optional product_id for area product_public as well as internal. Before, it accepted product_id only for internal documents. Legal website documents (legal_web) still refuse a product with invalid_product.
Why
Werkmeister's CRA run reads a product's own, published documents that are linked to the product, its family or a component, whatever their area. A data sheet filed under "Produktdokumente (öffentlich)" could not carry a product, so it never reached the run unless staff linked it afterwards with PATCH /v1/admin/documents/{doc}.
This extends the store model from #88: public product documents can now name their product. It isn't a reading of the original spec.
Notes
product_id stays optional, so existing uploads and clients work unchanged.
Existing public product documents don't gain a link. Staff can still link them through the admin PATCH.
The workspace import still files product documents without a product, because the bundle names none.
No migration: project_ids already exists on the document.
The portal sends the product for public documents in a follow-up PR, which merges after this one.
Tests
TestStoreUploadRules:
a public product document with a product is stored with that product, as the tenant's own document;
## What
The store upload (`POST /v1/tenants/{id}/store/documents`) accepts the optional `product_id` for area `product_public` as well as `internal`. Before, it accepted `product_id` only for internal documents. Legal website documents (`legal_web`) still refuse a product with `invalid_product`.
## Why
Werkmeister's CRA run reads a product's own, published documents that are linked to the product, its family or a component, whatever their area. A data sheet filed under "Produktdokumente (öffentlich)" could not carry a product, so it never reached the run unless staff linked it afterwards with `PATCH /v1/admin/documents/{doc}`.
This extends the store model from #88: public product documents can now name their product. It isn't a reading of the original spec.
## Notes
- `product_id` stays optional, so existing uploads and clients work unchanged.
- Existing public product documents don't gain a link. Staff can still link them through the admin PATCH.
- The workspace import still files product documents without a product, because the bundle names none.
- No migration: `project_ids` already exists on the document.
- The portal sends the product for public documents in a follow-up PR, which merges after this one.
## Tests
`TestStoreUploadRules`:
- a public product document with a product is stored with that product, as the tenant's own document;
- a legal document with a product is refused;
- a topic as product is still refused.
`go vet ./...` and `go test ./...` are green locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
The store upload accepted product_id only for internal documents, so a
data sheet filed under "Produktdokumente (öffentlich)" never reached the
product's CRA run in Werkmeister, which reads own, published documents
linked to the product. product_public now takes the same optional
product; legal website documents still refuse one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang
merged commit b14d6f61f0 into main2026-10-30 10:36:21 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
The store upload (
POST /v1/tenants/{id}/store/documents) accepts the optionalproduct_idfor areaproduct_publicas well asinternal. Before, it acceptedproduct_idonly for internal documents. Legal website documents (legal_web) still refuse a product withinvalid_product.Why
Werkmeister's CRA run reads a product's own, published documents that are linked to the product, its family or a component, whatever their area. A data sheet filed under "Produktdokumente (öffentlich)" could not carry a product, so it never reached the run unless staff linked it afterwards with
PATCH /v1/admin/documents/{doc}.This extends the store model from #88: public product documents can now name their product. It isn't a reading of the original spec.
Notes
product_idstays optional, so existing uploads and clients work unchanged.project_idsalready exists on the document.Tests
TestStoreUploadRules:go vet ./...andgo test ./...are green locally.🤖 Generated with Claude Code
https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf