[PR #3890] [CLOSED] feat(web,server): Shared accounts / sharing pictures with family / pictures in timeline / "family space" #10152

Closed
opened 2026-02-05 14:16:48 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/3890
Author: @korotovsky
Created: 8/28/2023
Status: Closed

Base: mainHead: feat/account-switch


📝 Commits (1)

  • c1dc6a3 feat(web, server): Shared accounts

📊 Changes

20 files changed (+272 additions, -25 deletions)

View changed files

📝 server/immich-openapi-specs.json (+21 -1)
📝 server/src/domain/auth/auth.service.ts (+48 -2)
📝 server/src/domain/auth/response-dto/auth-device-response.dto.ts (+2 -0)
📝 server/src/domain/user/dto/create-user.dto.ts (+4 -0)
📝 server/src/domain/user/dto/update-user.dto.ts (+8 -0)
📝 server/src/domain/user/response-dto/user-response.dto.ts (+4 -0)
📝 server/src/domain/user/user.core.ts (+15 -0)
📝 server/src/immich/app.guard.ts (+1 -0)
📝 server/src/infra/entities/user-token.entity.ts (+6 -0)
📝 server/src/infra/entities/user.entity.ts (+11 -0)
server/src/infra/migrations/1692880809207-AddSharedAccountCapabilities.ts (+16 -0)
server/src/infra/migrations/1692906088974-AddContextToUserToken.ts (+16 -0)
📝 web/src/lib/components/admin-page/settings/setting-select.svelte (+1 -1)
📝 web/src/lib/components/admin-page/settings/setting-switch.svelte (+6 -0)
📝 web/src/lib/components/forms/create-user-form.svelte (+33 -15)
📝 web/src/lib/components/forms/edit-user-form.svelte (+46 -4)
📝 web/src/lib/components/forms/login-form.svelte (+1 -1)
📝 web/src/lib/components/user-settings-page/device-card.svelte (+22 -1)
📝 web/src/routes/admin/user-management/+page.svelte (+10 -0)
📝 web/src/test-data/factories/user-factory.ts (+1 -0)

📄 Description

Hi Immich team,

Thanks for the great project,

As was discussed, I created this PR to collect further feedback and let it wait until libraries functionality gets merged.

The info and background about this PR: It works in a way like non interactive login and you can assign other accounts to be logged into this account programmatically once you have performed an interactive login with password/SAML. As as result multiple users ends up into "shared" account where all photos belongs to the same user aka one family group. Family group can also share its own albums to other users in Immich, this way we achieve two-hop sharing (see FAQ below for more info).

Audit log has been patched as well, you can also see you is actually using this meta account.

Screenshot 2023-08-25 at 00 01 50 Screenshot 2023-08-24 at 23 55 59

This might be not ideal, but amount of effort vs product outcome in my opinion is great:

This implementation gives us:

FAQ:
What is "non-interactive login account":

  • Account has restricted abilities for interactive login: password/SAML is blocked and you can not login into this account directly from the login page.

How do you see managing the change of password with your solution?

  • Password change and initial password-set forms are not affected by this functionality for accounts with interactive login capabilities.

What is two-hop sharing?

  • Account "A" (with Google OpenID/password credentials) -> ---- does programmatic authentication ----- -> account C (non interactive account "Family Space") - > ----- shares album to other accounts in Immich -> Account E (with Google OpenID/password credentials)
    • Account "A" - me
    • Account "B" - other person in same household
    • Account "C" - family space (non interactive login account)
    • Account "E" - parent

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/3890 **Author:** [@korotovsky](https://github.com/korotovsky) **Created:** 8/28/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/account-switch` --- ### 📝 Commits (1) - [`c1dc6a3`](https://github.com/immich-app/immich/commit/c1dc6a341961339dd384725e38235993bce3dc9c) feat(web, server): Shared accounts ### 📊 Changes **20 files changed** (+272 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `server/immich-openapi-specs.json` (+21 -1) 📝 `server/src/domain/auth/auth.service.ts` (+48 -2) 📝 `server/src/domain/auth/response-dto/auth-device-response.dto.ts` (+2 -0) 📝 `server/src/domain/user/dto/create-user.dto.ts` (+4 -0) 📝 `server/src/domain/user/dto/update-user.dto.ts` (+8 -0) 📝 `server/src/domain/user/response-dto/user-response.dto.ts` (+4 -0) 📝 `server/src/domain/user/user.core.ts` (+15 -0) 📝 `server/src/immich/app.guard.ts` (+1 -0) 📝 `server/src/infra/entities/user-token.entity.ts` (+6 -0) 📝 `server/src/infra/entities/user.entity.ts` (+11 -0) ➕ `server/src/infra/migrations/1692880809207-AddSharedAccountCapabilities.ts` (+16 -0) ➕ `server/src/infra/migrations/1692906088974-AddContextToUserToken.ts` (+16 -0) 📝 `web/src/lib/components/admin-page/settings/setting-select.svelte` (+1 -1) 📝 `web/src/lib/components/admin-page/settings/setting-switch.svelte` (+6 -0) 📝 `web/src/lib/components/forms/create-user-form.svelte` (+33 -15) 📝 `web/src/lib/components/forms/edit-user-form.svelte` (+46 -4) 📝 `web/src/lib/components/forms/login-form.svelte` (+1 -1) 📝 `web/src/lib/components/user-settings-page/device-card.svelte` (+22 -1) 📝 `web/src/routes/admin/user-management/+page.svelte` (+10 -0) 📝 `web/src/test-data/factories/user-factory.ts` (+1 -0) </details> ### 📄 Description Hi Immich team, Thanks for the great project, As was discussed, I created this PR to collect further feedback and let it wait until libraries functionality gets merged. **The info and background about this PR**: It works in a way like non interactive login and you can assign other accounts to be logged into this account programmatically once you have performed an interactive login with password/SAML. As as result multiple users ends up into "shared" account where all photos belongs to the same user aka one family group. Family group can also share its own albums to other users in Immich, this way we achieve two-hop sharing (see FAQ below for more info). Audit log has been patched as well, you can also see you is actually using this meta account. <img width="300" alt="Screenshot 2023-08-25 at 00 01 50" src="https://github.com/immich-app/immich/assets/104727/8866b3a8-9af3-4850-9381-b0ac73647d6c"> <img width="300" alt="Screenshot 2023-08-24 at 23 55 59" src="https://github.com/immich-app/immich/assets/104727/838ad43e-6fbc-4a6c-9684-8f0b10948745"> This might be not ideal, but amount of effort vs product outcome in my opinion is great: **This implementation gives us**: - One shared family space as an virtual account; - Closes https://github.com/immich-app/immich/discussions/3886 - Closes https://github.com/immich-app/immich/discussions/3781 - Partially closes https://github.com/immich-app/immich/issues/1043 - Closes https://github.com/immich-app/immich/discussions/3843 if belongs to the same family - Closes https://github.com/immich-app/immich/discussions/3418 if belongs to the same family; - Display shared photos in main photo feed; - Search capabilities; - Facial data can be shared; - Geo data can be shared; - Edit/delete functionalities within "family" account; - **Simple**: does not touch core immich queries for selecting photos, etc because implemented as part of authentication layer. **FAQ**: What is "_non-interactive login account_": - Account has restricted abilities for interactive login: password/SAML is blocked and you can not login into this account directly from the login page. How do you see managing the change of password with your solution? - Password change and initial password-set forms are not affected by this functionality for accounts with interactive login capabilities. What is two-hop sharing? - Account "A" (with Google OpenID/password credentials) -> ---- does programmatic authentication ----- -> account C (non interactive account "Family Space") - > ----- shares album to other accounts in Immich -> Account E (with Google OpenID/password credentials) - Account "A" - me - Account "B" - other person in same household - Account "C" - family space (non interactive login account) - Account "E" - parent --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:16:48 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#10152