Commit graph

23 commits

Author SHA1 Message Date
Keith Martin
b6687b6c29
Tests: Improve isolation and add fixes #5263
* Tests: fix random selection of deleted record causing test failure
* Tests: fix test folders being left after test
* Tests: ensure that required records are available
* Tests: make each package execute against it's own testdata folder to ensure no interpackage test failures
* Tests: add unit tests of CleanupTestFolder
* Tests:  Allow defer in TestMain
* Tests: rename testMain to runTestMain
2026-07-12 05:47:21 +02:00
Michael Mayer
a2e8592dd5 Auth: Localize login/session/OIDC error responses via messageId #5699 #5682 2026-06-27 11:34:54 +00:00
Cathie Integra
3f096a592b Links: Use canonical trailing-slash form for website URLs 2026-06-24 17:20:30 +02:00
Michael Mayer
c5658a053d API: Align i18n.Response Go field names with JSON keys #5682
Rename the Response struct fields to match their json tags (Err to Error, Msg to Message) and the Error() method to ErrorString() to avoid a field/method clash; update callers and tests. JSON wire format is unchanged.
2026-06-23 12:42:57 +00:00
Michael Mayer
fd8448d6de UX: Name message fields messageId/messageParams in i18n payloads #5682
Rename the i18n notification/error envelope fields from id/params to messageId/messageParams across the WS notify Data and the i18n.Response body, so they are unambiguous next to session, log, and correlation ids. Updates the frontend consumers (notify.vue, api.js), tests, swagger, and the event/locales READMEs.
2026-06-23 12:22:30 +00:00
Michael Mayer
f5373ccec6 UX: Render backend error responses in the current UI locale #5682
The i18n.Response envelope now carries the untranslated source id and params; the frontend (api.js) renders them via Tp in the user's UI locale, with the server-rendered error/message as the instance-locale fallback. Common not-found/conflict/bad-request handlers were switched from hardcoded literals and raw err.Error() to Abort/i18n.Message helpers, so they benefit automatically.
2026-06-23 12:06:49 +00:00
Michael Mayer
9ecdb0ae26 UX: Render backend notifications in the current UI locale #5682
Backend *Msg helpers now publish the untranslated message id and params alongside the rendered fallback; the frontend translates the id and applies a positional-placeholder shim so notifications render in each user's UI language.
2026-06-23 09:06:46 +00:00
Michael Mayer
bc327016ad Metadata: Add Camera Make and Model updates via CLI & API #5663 #5656
Mirror the lens make/model editing surface for cameras: entity UpdateMakeModel/SaveForm, form validation, query, search, the GET/PUT /api/v1/cameras endpoints, and the cameras CLI command, plus a cameras ACL resource and scope.

Also tidy the lens surface for parity: self-validating SaveForm, empty make/model guard, X-Count search header, service-role grant, the empty-id/slug docs, and order cameras before lenses everywhere.
2026-06-15 09:25:44 +00:00
Keith Martin
c3eda657fd
Metadata: Add Lens Make and Model updates via CLI & API #5644 #5656
Adds the ability to override a lens's Make/Model (e.g. fixing Pentax lenses that ExifTool decodes as `4 38`) via a new photoprism lenses update CLI command and a `PUT /api/v1/lenses/:id endpoint`, plus a `GET /api/v1/lenses` search endpoint, a new lenses ACL resource, and an lenses ls list command.
2026-06-15 09:37:32 +02:00
Michael Mayer
570a563748 Docs: Bump copyright year to 2026 in Go package headers 2026-05-25 14:39:38 +00:00
Michael Mayer
a2b7615c93 Go: Apply go fix modernizations across backend packages
Run `go fix ./...` and keep mechanical modernization updates.

- Replace `interface{}` with `any` in signatures and local types
- Apply formatter/style cleanups from go1.26 tooling
- Keep `omitempty` behavior-preserving simplifications suggested by fix
- No functional feature changes intended

Validation:
- go test ./... -run '^$' -count=1 (Go 1.26.0)
- GOTOOLCHAIN=go1.24.10 go test ./... -run '^$' -count=1

Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-20 03:54:33 +01:00
Michael Mayer
149f5e5731 CI: Apply Go linter recommendations to remaining "pkg/..." code #5330
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-11-22 16:14:43 +01:00
Michael Mayer
0354fad37e Demo: Improve protection against AI-generated reports #5269
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-17 19:34:39 +02:00
Michael Mayer
b00dd133db Test: Use PascalCase names for all Go subtests in /pkg
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-02 15:03:47 +02:00
Michael Mayer
61ced7119c Auth: Refactor cluster configuration and provisioning API endpoints #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-24 08:28:38 +02:00
Michael Mayer
b0c3572432 Backend: Refactor function calls with missing params... after Go update
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-07 16:02:54 +02:00
Michael Mayer
a66d3278ab API: Prevent file imports/uploads if there is no free storage #4266
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-11 20:35:07 +01:00
Michael Mayer
7a97b38cb3 UX: Specify files quota in GB instead of MB #4266
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-11 18:04:10 +01:00
Michael Mayer
b1d9f24fc5 Config: Disable uploads and imports when storage is full #4266
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-04 08:28:28 +01:00
Michael Mayer
01f15fa406 Backend: Update copyright notices
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-09 10:28:17 +01:00
Michael Mayer
fe54cc7ef3 Auth: Fix 2-Factor Authentication (2FA) prompt on the login page #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-08 15:50:02 +02:00
Michael Mayer
fbb0284efa OIDC: Allow to use nickname as username #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-05 10:47:09 +02:00
Michael Mayer
4425becb3d Auth: Implement 2FA setup and login in the web user interface #808 #3943
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-03-21 14:32:51 +01:00