Skip to content

feat: sync pictureFile with oidc if it isn't set already #17397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

Etienne-bdt
Copy link
Contributor

@Etienne-bdt Etienne-bdt commented Apr 4, 2025

Description

Syncs profile.picture to the filesystem and updates user.profileImagePath accordingly. It will do this if the user doesn't already have a profile image path. This logic runs on every login.

@Etienne-bdt Etienne-bdt marked this pull request as draft April 4, 2025 21:28
@Etienne-bdt
Copy link
Contributor Author

Edit, I will try to put the picture in the profile folder, it's a bit cleaner. I do not know if it will suffice for it to be auto-cleaned upon user deletion or if I need to do something in addition.

@Etienne-bdt
Copy link
Contributor Author

I do not know if it will suffice for it to be auto-cleaned upon user deletion

It does.

I need to fix the tests now and I think it will be good to go

@Etienne-bdt Etienne-bdt marked this pull request as ready for review April 4, 2025 22:04
@bo0tzz bo0tzz requested a review from jrasm91 April 5, 2025 09:17
@Etienne-bdt Etienne-bdt force-pushed the oidc-register-picture-sync branch from ba53c32 to b9d24cb Compare April 9, 2025 07:39
fix: move picture writer to get userId

fix: move await promise to the top of the setPicure function before checking its value and automatically create the user folder

chore: code cleanup
@jrasm91 jrasm91 force-pushed the oidc-register-picture-sync branch from 2a9e19b to ea5cba5 Compare April 11, 2025 16:39
@alextran1502 alextran1502 merged commit d7a782d into immich-app:main Apr 11, 2025
42 checks passed
savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
…17397)

* feat: sync pictureFile with oidc if it isn't set already

fix: move picture writer to get userId

fix: move await promise to the top of the setPicure function before checking its value and automatically create the user folder

chore: code cleanup

* fix: extension double dot

---------

Co-authored-by: Jason Rasmussen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants