Skip to content

Import thumbnail photos when LDAP users are created. - #2320

Merged
ssddanbrown merged 2 commits into
BookStackApp:masterfrom
jasonhoule:master
May 24, 2021
Merged

ssddanbrown merged 2 commits into
BookStackApp:masterfrom
jasonhoule:master

Conversation

@jasonhoule

Copy link
Copy Markdown
Contributor

My BookStack instance is using Active Directory for authentication. We wanted to be able to automatically import the user photos that we already have stored in Active Directory.

This change, controlled by config values in the config/services.php file, allows for user avatars to be imported from the LDAP thumbnailPhoto attribute. Users can still update their images from the profile page.

ssddanbrown added a commit that referenced this pull request May 24, 2021
- Reduced options to single new configuration paramter instead of two.
- Moved more logic into UserAvatars class.
- Updated LDAP avatar import to also run on login when no image is
  currently set.
- Added thumbnail fetching to search requests.
- Added testing to cover.

Related to PR #2320, and issue #1161
@ssddanbrown
ssddanbrown merged commit 85db812 into BookStackApp:master May 24, 2021
@ssddanbrown ssddanbrown linked an issue May 24, 2021 that may be closed by this pull request
@ssddanbrown ssddanbrown added this to the Next Feature Release milestone May 24, 2021
@ssddanbrown

Copy link
Copy Markdown
Member

Thanks a bunch for this @jasonhoule. Now merged for the next feature release.

I followed this up with some changes in df0e03c. I removed the LDAP_IMPORT_THUMBNAIL_PHOTOS option and now the functionality will run depending on whether the LDAP_THUMBNAIL_ATTRIBUTE option has been defined. I also tweaked the logic to import on every login if the user does not have an image already set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Ldap import user avatar

2 participants