From 123f0aea00687d98893036e252efa7ff672b3ad5 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 27 Sep 2021 03:39:36 +0100 Subject: Allow LDAP Sources to provide Avatars (#16851) * Allow LDAP Sources to provide Avatars Add setting to LDAP source to allow it to provide an Avatar. Currently this is required to point to the image bytes. Fix #4144 Signed-off-by: Andrew Thornton * Rename as Avatar Attribute (drop JPEG) Signed-off-by: Andrew Thornton * Always synchronize avatar if there is change Signed-off-by: Andrew Thornton * Actually get the avatar from the ldap Signed-off-by: Andrew Thornton * clean-up Signed-off-by: Andrew Thornton * use len()>0 rather than != "" Signed-off-by: Andrew Thornton * slight shortcut in IsUploadAvatarChanged Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- routers/web/admin/auths.go | 1 + 1 file changed, 1 insertion(+) (limited to 'routers/web/admin/auths.go') diff --git a/routers/web/admin/auths.go b/routers/web/admin/auths.go index a394b4fdc2..803dcafa28 100644 --- a/routers/web/admin/auths.go +++ b/routers/web/admin/auths.go @@ -136,6 +136,7 @@ func parseLDAPConfig(form forms.AuthenticationForm) *ldap.Source { AttributeMail: form.AttributeMail, AttributesInBind: form.AttributesInBind, AttributeSSHPublicKey: form.AttributeSSHPublicKey, + AttributeAvatar: form.AttributeAvatar, SearchPageSize: pageSize, Filter: form.Filter, GroupsEnabled: form.GroupsEnabled, -- cgit v1.2.3