adobe-apiplatform/user-sync.py

users not processed correctly when username and email have different domains

cbalanoiu opened this issue · 1 comments

Description
Users are not processed correctly when username and email have different domains when removing from file.

Steps to reproduce
When using write-to-file the tool exports [type,username,domain]
When removing from file (--adobe-only-user-list users-to-delete.csv --adobe-only-user-action delete) the username value is compared to the email

Expected behavior
The tool should compare corresponding values , i.e. have a case for username and email with different domains.

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2022-12-05 at 14 10 10
Screenshot 2022-12-05 at 14 13 36

Environment

  • UST version: 2.7.5
  • OS type and version: Win Server 2012

The central issue is that the UMAPI expects the user to be identified by email address and not username.

I've resolved this issue by modifying the write function to write the email address of each user instead of the username. The read function has been modified to look for the email address first and only try the username if the email address is not provided. This maintains backward compatibility.

It now logs a warning if the username is being used to identify a user.

See 651d211 for more info.