-
Notifications
You must be signed in to change notification settings - Fork 66
User update fix #811
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
User update fix #811
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line 960 checks:
if directory_user is None:
at this stage we know that an umapi user_key
was resolved from the list of directory_users
.
To solve the fact that the username can't be updated in this version we could do at this stage the check if:
normalize_string(umapi_user['username'])
!= normalize_string(directory_user['username'])
and log a warning under the self.logger.debug("Adobe user matched on customer side: %s", user_key)
self.logger.warning('Username differences found: %s / %s',umapi_user['username'], directory_user['username'])
This bit of code can be removed after the username updates will be possible. Sounds OK?
Since we agreed to plan to release the username update feature in the same release as this fix, I don't think we need the temporary warning. Here's the feature branch for username update: https://github.com/adobe-apiplatform/user-sync.py/tree/feature/username-update Once I get a chance to test it more I'll work on the configuration feature to select which fields to update. |
adapt `umapi_info.add_desired_group_for` with the arguments from the new function definition
@Luci2015 - are you still testing? I hoped to have this merged a week ago. What can I help you with to get this finished up? |
update umapi.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works with csv input
Summary
This is to fix a regression found in
v2.8.0
which prevents the sync tool from updating a user's email address. This was likely caused by the introduction of the email address to the static user key.The fix I propose is to stop indexing user information using this static composite key. It never worked super well because of how the UMAPI and admin console identify users by email address under most circumstances but also require username in others.
I've created a system that indexes user info by multiple keys, but only one key is required to identify a user when looking it up in the index. This is implemented in a new class in the UMAPI engine file called
MultiIndex
.More information can be found in the class's docstring:
Testing Steps
I've tested this with one UMAPI target, primary + secondary and secondary only (which produces the expected UMAPI errors). I've also tested the update with Adobe-only CSV files (read/write).
Fixes #810