This repository has been archived by the owner on Sep 24, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IntegrityError when user has multiple email addresses (#29)
Since you can set up multiple email addresses for users, it is possible that sentry_ldap_auth updates the wrong email address when changing the UserEmail field. Say, you have two UserEmail objects for an user, 'personal' and 'system-wide'. When 'personal' gets updated to "system-wide", this generates an IntegrityError because (user, email) is unique in the database, preventing logon. I doubt this entire structure is even necessary because when the 'email' attribute is set correctly on ``AUTH_LDAP_USER_ATTR_MAP`` this should all happen automatically.
- Loading branch information