[PR #4889] [CLOSED] feat(server,web): Add private album feature #10552

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

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/4889
Author: @jarvis2f
Created: 11/7/2023
Status: Closed

Base: mainHead: dev/private-album


📝 Commits (1)

  • 1debd70 feat(server,web): Add private album feature

📊 Changes

86 files changed (+1545 additions, -104 deletions)

View changed files

📝 cli/src/api/open-api/api.ts (+149 -5)
📝 mobile/openapi/.openapi-generator/FILES (+3 -0)
📝 mobile/openapi/README.md (+2 -0)
📝 mobile/openapi/doc/AlbumApi.md (+4 -2)
📝 mobile/openapi/doc/AlbumResponseDto.md (+1 -0)
📝 mobile/openapi/doc/CreateAlbumDto.md (+1 -0)
📝 mobile/openapi/doc/UpdateAlbumDto.md (+1 -0)
📝 mobile/openapi/doc/UpdateUserDto.md (+1 -0)
📝 mobile/openapi/doc/UserApi.md (+55 -0)
📝 mobile/openapi/doc/UserResponseDto.md (+1 -0)
mobile/openapi/doc/ValidatePrivateAlbumPasswordDto.md (+15 -0)
📝 mobile/openapi/lib/api.dart (+1 -0)
📝 mobile/openapi/lib/api/album_api.dart (+10 -3)
📝 mobile/openapi/lib/api/user_api.dart (+39 -0)
📝 mobile/openapi/lib/api_client.dart (+2 -0)
📝 mobile/openapi/lib/model/album_response_dto.dart (+9 -1)
📝 mobile/openapi/lib/model/create_album_dto.dart (+18 -1)
📝 mobile/openapi/lib/model/update_album_dto.dart (+20 -3)
📝 mobile/openapi/lib/model/update_user_dto.dart (+18 -1)
📝 mobile/openapi/lib/model/user_response_dto.dart (+9 -1)

...and 66 more files

📄 Description

I have added a private option to the album, so that some photos that you don't want to make public can be placed on the album.
On the album interface, you can set the album to private, so that when the password of the private album is not entered, all the photos under this album are hidden in all places.

How to set

  • On the album card view, list view, or album details page, set the album to private
  • Set the password for the private album in the personal settings
  • On the album page, press: ↑↑↓↓←→←→baba (this is the secret code for Contra), a dialog box will pop up to enter the password, and then you can view the private album
  • Click the eye icon in the lower right corner of the page to quickly close the display of the private album

(Mobile devices currently do not support setting and viewing private photo albums)

How to implement

  • Added a field: isPrivate, on the album entity to indicate whether the album is a private album. Other resources, faces, photos, etc. are judged as private resources by associating with the album.
    After entering the password for the private album, a request is made to /user/validate-private-album-password to verify if the password is correct. If it is correct, the ${userId}-${password} hashed is saved to the cookie.
    Subsequent request processing is consistent with accessToken, verifying whether ${userId}-${password} is correct. If it is correct, the isShowPrivateAlbum field in AuthUserDto is set to true.
  • Added the isPrivate field in album.schema.ts and asset.schema.ts, used to indicate whether the album and resources are private in searches.

I have tested most scenarios, including sharing, the map page, and private albums and resources in searches, and they will not be displayed. If there are any omissions, please feel free to point them out.

Screenshot

private password input dialog private album setting btn private mode close btn account private password setting
img img_1 img_2 img_3

🔄 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/4889 **Author:** [@jarvis2f](https://github.com/jarvis2f) **Created:** 11/7/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dev/private-album` --- ### 📝 Commits (1) - [`1debd70`](https://github.com/immich-app/immich/commit/1debd70f38b3f0d2641402d5b78f6cec701feb68) feat(server,web): Add private album feature ### 📊 Changes **86 files changed** (+1545 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `cli/src/api/open-api/api.ts` (+149 -5) 📝 `mobile/openapi/.openapi-generator/FILES` (+3 -0) 📝 `mobile/openapi/README.md` (+2 -0) 📝 `mobile/openapi/doc/AlbumApi.md` (+4 -2) 📝 `mobile/openapi/doc/AlbumResponseDto.md` (+1 -0) 📝 `mobile/openapi/doc/CreateAlbumDto.md` (+1 -0) 📝 `mobile/openapi/doc/UpdateAlbumDto.md` (+1 -0) 📝 `mobile/openapi/doc/UpdateUserDto.md` (+1 -0) 📝 `mobile/openapi/doc/UserApi.md` (+55 -0) 📝 `mobile/openapi/doc/UserResponseDto.md` (+1 -0) ➕ `mobile/openapi/doc/ValidatePrivateAlbumPasswordDto.md` (+15 -0) 📝 `mobile/openapi/lib/api.dart` (+1 -0) 📝 `mobile/openapi/lib/api/album_api.dart` (+10 -3) 📝 `mobile/openapi/lib/api/user_api.dart` (+39 -0) 📝 `mobile/openapi/lib/api_client.dart` (+2 -0) 📝 `mobile/openapi/lib/model/album_response_dto.dart` (+9 -1) 📝 `mobile/openapi/lib/model/create_album_dto.dart` (+18 -1) 📝 `mobile/openapi/lib/model/update_album_dto.dart` (+20 -3) 📝 `mobile/openapi/lib/model/update_user_dto.dart` (+18 -1) 📝 `mobile/openapi/lib/model/user_response_dto.dart` (+9 -1) _...and 66 more files_ </details> ### 📄 Description I have added a private option to the album, so that some photos that you don't want to make public can be placed on the album. On the album interface, you can set the album to private, so that when the password of the private album is not entered, all the photos under this album are hidden in all places. ## How to set * On the album card view, list view, or album details page, set the album to private * Set the password for the private album in the personal settings * On the album page, press: ↑↑↓↓←→←→baba (this is the secret code for Contra), a dialog box will pop up to enter the password, and then you can view the private album * Click the eye icon in the lower right corner of the page to quickly close the display of the private album (Mobile devices currently do not support setting and viewing private photo albums) ## How to implement * Added a field: isPrivate, on the album entity to indicate whether the album is a private album. Other resources, faces, photos, etc. are judged as private resources by associating with the album. After entering the password for the private album, a request is made to `/user/validate-private-album-password` to verify if the password is correct. If it is correct, the `${userId}-${password}` hashed is saved to the cookie. Subsequent request processing is consistent with `accessToken`, verifying whether `${userId}-${password}` is correct. If it is correct, the `isShowPrivateAlbum` field in `AuthUserDto` is set to `true`. * Added the `isPrivate` field in `album.schema.ts` and `asset.schema.ts`, used to indicate whether the album and resources are private in searches. I have tested most scenarios, including sharing, the map page, and private albums and resources in searches, and they will not be displayed. If there are any omissions, please feel free to point them out. ## Screenshot |private password input dialog| private album setting btn | private mode close btn |account private password setting| |---|---|---|---| |![img](https://github.com/immich-app/immich/assets/137974272/a8fa9338-e25a-4021-8245-72f8df39290a)| ![img_1](https://github.com/immich-app/immich/assets/137974272/bf355a23-028c-4b03-a57c-393f3b58c25d) | ![img_2](https://github.com/immich-app/immich/assets/137974272/763d3dd5-8989-45bb-8cc6-cb757fb45efd) |![img_3](https://github.com/immich-app/immich/assets/137974272/589fc313-bcb4-4715-ac07-f2ba8bfe8ee3)| --- <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:23:59 +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#10552