linkedin / linkedin/oncall

ldap_sync and User Editable Contact Info

Open
#155 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.3k
Forks
245
PR merge metrics
No merged PRs in 30d

Description

Related to https://github.com/linkedin/oncall/issues/114

I really do like how users can edit their own contact info now. Makes the process a lot less painful than having to update Active Directory every time they want to change phone numbers.

However, we're running up against an issue where ldap_sync syncs down an _empty_ call/sms contact_mode to the user, overwriting any contact info they already had in the DB. Furthermore, the User Settings page does not allow a user to _add_ their phone number if they don't already have that contact mode -- the field simply isn't shown.

I'm fixing this in our environment with two changes:
1) ldap_sync will never sync down a blank contact field to overwrite a populated field. This is just destroying data.
2) If ldap_sync sees call and SMS in LDAP, it will at least sync down a blank string so the user can add in a phone number in their Settings page a later date.

How do you feel about fixing it this way? If this is acceptable I can have a PR sent over in a few mins. Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by tracing the ldap_sync behavior and the User Settings page described in the issue, then inspect how contact fields are persisted and rendered. Reproduce the empty-field overwrite and missing call/SMS field cases in the existing test setup. Done means populated contact data is preserved while LDAP call/SMS entries still let users add a number later.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.