Store avatars as binary instead of base64
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-24 15:56:34 +03:00
parent 6d7d722c5d
commit 9e2210c45b
5 changed files with 35 additions and 24 deletions

View File

@@ -5,12 +5,12 @@ module LdapManager
end
def call
treebase = ldap_config["base"]
treebase = ldap_config["base"]
attributes = %w{ jpegPhoto }
filter = Net::LDAP::Filter.eq("cn", @cn)
filter = Net::LDAP::Filter.eq("cn", @cn)
entry = client.search(base: treebase, filter: filter, attributes: attributes).first
entry.try(:jpegPhoto) ? entry.jpegPhoto.first : nil
entry&.jpegPhoto ? entry.jpegPhoto.first : nil
end
end
end