User avatars #223

Merged
raucao merged 10 commits from feature/user_avatars into master 2025-05-14 14:58:15 +00:00
Owner

Allows to upload a user avatar in the profile settings. Avatars are stored as ActiveStorage attachments either locally or on S3 (according to app configuration). An additional 256px jpeg version is stored in LDAP as the standardized jpegPhoto attribute.

  • When configured correctly in ejabberd and Gitea, the avatar should be used from LDAP (after login actions), if there is no other avatar set. But if there is one (or one is added later), then it should not be used.
  • Similarly, the avatar is handed over to Discourse during the SSO procedure, and should only be downloaded and used there if there is no other avatar uploaded by the user
  • A public avatar URL is added to the Webfinger links when available (the only unused official rel at the moment)

closes #157
refs #174

Allows to upload a user avatar in the profile settings. Avatars are stored as ActiveStorage attachments either locally or on S3 (according to app configuration). An additional 256px jpeg version is stored in LDAP as the standardized `jpegPhoto` attribute. * When configured correctly in ejabberd and Gitea, the avatar should be used from LDAP (after login actions), if there is no other avatar set. But if there is one (or one is added later), then it should not be used. * Similarly, the avatar is handed over to Discourse during the SSO procedure, and should only be downloaded and used there if there is no other avatar uploaded by the user * A public avatar URL is added to the Webfinger links when available (the only unused official rel at the moment) closes #157 refs #174
raucao added 3 commits 2025-05-11 14:44:57 +00:00
refs #174
Store avatars as binary instead of base64
All checks were successful
continuous-integration/drone/push Build is passing
9e2210c45b
WIP Store avatars as ActiveStorage attachments
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
17ffbde03a
Also push to LDAP as jpegPhoto
raucao added the
feature
label 2025-05-11 19:21:15 +00:00
raucao added 2 commits 2025-05-12 11:06:16 +00:00
Add avatar URL to Discourse Connect
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
46b908839d
Discourse should download and set the avatar if the user doesn't have
one set yet.
raucao added 1 commit 2025-05-12 12:40:40 +00:00
Fix S3 keys/paths for user avatars
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
51a3652fc8
Also fixes the avatars controller to work with all back-ends
raucao added 1 commit 2025-05-12 14:10:42 +00:00
Add note about variants not working when not generated ad-hoc
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
1884f082ee
raucao added 1 commit 2025-05-14 10:44:08 +00:00
Do not use ActiveStorage variants, process original avatar
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
417e346074
Variants are currently broken. So we process the original file with the
most common avatar dimensions and stripping metadata, then hash and
upload only that version.
raucao added 1 commit 2025-05-14 11:40:28 +00:00
Add avatar URL to Webfinger when available
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
a098ea43bb
raucao changed title from WIP: User avatars to User avatars 2025-05-14 11:59:56 +00:00
raucao added the
kredits-2
label 2025-05-14 12:00:02 +00:00
greg approved these changes 2025-05-14 13:30:31 +00:00
greg left a comment
Owner

👍

👍
raucao added 1 commit 2025-05-14 14:55:50 +00:00
Remove feature gate for avatar upload
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 2s
582d339c0a
raucao merged commit 03be2e09e6 into master 2025-05-14 14:58:15 +00:00
raucao deleted branch feature/user_avatars 2025-05-14 14:58:15 +00:00
Sign in to join this conversation.
No description provided.