Skip to content

Use jpegPhoto LDAP attribute as Avatar picture

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Implementation Plan

Based on a previous attempt at adding this feature: https://github.com/brigriffin/gitlabhq/commit/b8c5ba30919c72c5d66e9090b7b89a50cec5bb24

  • Add jpegPhoto to def user_attributes in lib/gitlab/auth/ldap/adapter.rb
  • Map photo to jpegPhoto (or thumbnailPhoto) in def default_attributes in lib/gitlab/auth/ldap/config.rb
  • Define photo in lib/gitlab/auth/ldap/person.rb (attribute_value(:photo))
  • Add tests (likely to be:
    • lib/gitlab/auth/ldap/person.rb
    • lib/gitlab/auth/ldap/config.rb
    • lib/gitlab/auth/ldap/adapter.rb

Bonus:

  • Create a rake task to import photos/avatars for all LDAP users and add specs (probably a separate merge request)
Edited by 🤖 GitLab Bot 🤖