Skip to content
Snippets Groups Projects

Set username from the returned LDAP attributes.

Merged Andrea Callia D'Iddio requested to merge fix-impersonation into master

With this MR, when logging in, the current username is set directly from the returned LDAP attributes, which prevents any issue with special operators used when specifying the username - e.g. impersonation operator, without the need to handle the impersonation logic, and therefore keeping the impersonation logic in just one place.

By doing this, there is no need to involve the auth.py module in the management of impersonation operators, keeping it "agnostic" with respect to how the username is specified and handled by the LDAP authenticator.

Before this fix, usernames like adumble as hpotter were added in the AuthenticatedUser table, instead of just hpotter, preventing the app from retrieving the right data associated with the impersonated user hpotter.

Edited by Andrea Callia D'Iddio

Merge request reports

Pipeline #329595 passed

Pipeline passed for 5884ee08 on fix-impersonation

Test coverage 66.00% (0.00%) from 1 job

Merged by Ivan ProcacciniIvan Procaccini 2 years ago (Nov 9, 2022 11:26am UTC)

Loading

Pipeline #329597 passed

Pipeline passed for 01fdfd62 on master

Test coverage 66.00% (0.00%) from 1 job
Deployed to produ‎ction‎ 2 years ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading