Files
immich-power-tools/src
jonvdveenandClaude Fable 5 1cc5d44e76 fix: update API key permissions for Immich v3 granular permissions
Immich v3 split album-membership rights out of album.update into
albumAsset.create / albumAsset.delete, and assigning tags to assets
requires tag.asset. The hardcoded WORKFLOW_PERMISSIONS list predates
this, so auto-generated workflow keys 403 at runtime on Add to Album
(and Add Tag) actions:

    Immich API error 403: {"message":"Missing required permission: albumAsset.create"}

Also, validate-api-key.ts literal-matched required permissions against
the key's permission list, so a key created with the "All" checkbox
(stored as ["all"]) failed validation for every permission — and the
settings page refuses to save a key that fails validation, making it
impossible to work around with a full-permission key.

- Add albumAsset.create, albumAsset.delete, tag.asset to
  WORKFLOW_PERMISSIONS (matching the endpoints actionExecutor.ts
  actually calls: PUT/DELETE /albums/:id/assets, PUT /tags/:id/assets)
- Add albumAsset.create to IMPORT_PERMISSIONS for the same reason
- Treat a granted "all" permission as satisfying all requirements in
  validate-api-key.ts

Follow-up to #294.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 18:26:43 -06:00
..