Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(user_ldap): Avoid extra LDAP request when mapping a user for the first time #46114

Merged
merged 6 commits into from
Sep 3, 2024

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Jun 25, 2024

Summary

Avoids using several LDAP searches to get UUID, display name and
internal name, now gets all attributes at the same time.
Also avoids extra request to build an unused user object in userExists.

TODO

  • Avoid extra request to fetch the display name by directly caching it. (The display name is fetched by dav to update the calendar entry as soon as the user is mapped). This is too complicated because of internal quirks, keeping an extra request for the display name for now.

Checklist

@come-nc come-nc added this to the Nextcloud 30 milestone Jun 25, 2024
@come-nc come-nc self-assigned this Jun 25, 2024
@come-nc come-nc force-pushed the enh/improve-ldap-group-members-listing-performances branch from 4b75668 to e681d82 Compare July 9, 2024 07:29
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 9, 2024
@come-nc come-nc marked this pull request as ready for review July 9, 2024 07:33
@come-nc

This comment was marked as outdated.

This was referenced Jul 30, 2024
This was referenced Aug 5, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
…first time

Avoids using several LDAP searches to get UUID, display name and
 internal name, now gets all attributes at the same time.
Also avoids extra request to build an unused user object in userExists.

Signed-off-by: Côme Chilliet <[email protected]>
Avoid surprises by making sure these are lowercased apart from
 documented special case user displayname.

Signed-off-by: Côme Chilliet <[email protected]>
@come-nc come-nc force-pushed the enh/improve-ldap-group-members-listing-performances branch from f3e9cde to c3029c7 Compare August 27, 2024 10:15
@come-nc come-nc requested review from blizzz, a team, ArtificialOwl, icewind1991 and sorbaugh and removed request for a team August 27, 2024 10:15
Signed-off-by: Côme Chilliet <[email protected]>
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not test, but looks good and reasonable

@blizzz blizzz merged commit 6b85a3a into master Sep 3, 2024
171 checks passed
@blizzz blizzz deleted the enh/improve-ldap-group-members-listing-performances branch September 3, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants