Skip to content

Commit ae60e59

Browse files
Merge pull request #774 from adobe-apiplatform/fix/esm-fix
Simplify identity type override for ESM trustees
2 parents 227ff11 + 4722e3e commit ae60e59

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

docs/en/user-manual/advanced_configuration.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ enterprise:
204204
uses_business_id: True
205205
```
206206

207-
This essentially overrides the Business ID user type to the type of the user from the primary target, ensuring that
208-
the full user lifecycle of the user on the secondary target is managed.
207+
This setting overrides the identity type of all users in the target to the identity type specified in the main sync config file.
208+
209+
**NOTE:** When using this option, it isn't sufficient to exclude users by identity type. Be sure to exclude by group
210+
(e.g. `_org_admin`) and/or email address.
209211

210212
## Custom Attributes and Mappings
211213

user_sync/engine/umapi.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ def __init__(self, caller_options):
113113
self.primary_users_created = set()
114114
self.secondary_users_created = set()
115115
self.updated_user_keys = set()
116-
self.primary_users_by_email: dict[str, dict] = {}
117116

118117
# stray key input path comes in, stray_list_output_path goes out
119118
self.stray_key_map = {}
@@ -922,9 +921,9 @@ def update_umapi_users_for_connector(self, umapi_info, umapi_connector: UmapiCon
922921
# Walk all the adobe users, getting their group data, matching them with directory users,
923922
# and adjusting their attribute and group data accordingly.
924923
for umapi_user in umapi_users:
925-
# if target is ESM, then treat existing AdobeID (i.e. businessID) as linked identity type
926-
if umapi_connector.uses_business_id and umapi_user['email'] in self.primary_users_by_email:
927-
umapi_user['type'] = self.primary_users_by_email[umapi_user['email']]['type']
924+
# if target is ESM, then override identity type
925+
if umapi_connector.uses_business_id:
926+
umapi_user['type'] = self.options['new_account_type']
928927
# let save adobeID users to a seperate list
929928
self.filter_adobeID_user(umapi_user)
930929
# get the basic data about this user; initialize change markers to "no change"
@@ -953,9 +952,6 @@ def update_umapi_users_for_connector(self, umapi_info, umapi_connector: UmapiCon
953952

954953
self.map_email_override(umapi_user)
955954

956-
if umapi_connector.is_primary:
957-
self.primary_users_by_email[umapi_user['email']] = umapi_user
958-
959955
directory_user = filtered_directory_user_by_user_key.get(user_key)
960956
if directory_user is None:
961957
# There's no selected directory user matching this adobe user

0 commit comments

Comments
 (0)