1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Signet PIM editor
PIM is Signet's deliberately reduced local product-information mirror: text
and image attributes belonging to an organisation. See `CONTEXT.md` for the
glossary. It does not mean “Personally Identifiable Information”.
## Access
- URL: `/pim/`, aliased to `/var/www/pim/` by lighttpd.
- API reads are available to authenticated users; writes require `pim_admin`.
- The current browser editor requires `pim_admin` even to display its UI.
- Identity comes from configured request headers. Authelia integration is
unverified, and the shared API code currently defaults missing headers to
admin. Keep development isolated; see `TESTING-AUTH.md`.
The PIM client uses plain `fetch` and does not read Signet's
`localStorage.signetDevIdentity`. Setting that value does not change the PIM
client's request headers.
## Attributes
Select or create an organisation, then add/edit/delete key/type/value rows.
Supported types are **text** and **image**, not separate date or number types.
Dates and numbers can be stored as text. Image values are validated
DAM-relative paths, such as `seals/agency_seal.png`.
Documents reference attribute keys, so a template can be used for different
organisations. The design requires values to be frozen at submit; current code
still reads Redis and DAM during worker rendering. See `HANDOFF.md` §4.
## API
```text
GET /pim-api/me → {user, roles:{pim_admin}}
GET /pim-api/attrs → [{org_code, attr_key, attr_type, attr_value}]
POST /pim-api/attrs → org, key, type, value (empty value deletes)
POST /pim-api/resync → rebuild Redis mirror from PostgreSQL
```
Both POST endpoints require `pim_admin` and `X-Requested-With: signet`.
Use explicit test identity headers for API authorization tests in the isolated
dev container; this does not test proxy authentication.
## Files
- `index.html` — editor markup
- `pim.js` — browser authentication checks and attribute management
The client runs in the browser, not through a container shell or a JS CLI.