Lines 285-290
def new_or_reactivate_user(ol, dn, new, old):
|
Link Here
|
---|
|
285 |
"User creation success. userPrincipalName: %r objectId: %r dn: %s adconnection: %s", |
285 |
"User creation success. userPrincipalName: %r objectId: %r dn: %s adconnection: %s", |
286 |
new_user["userPrincipalName"], new_user["objectId"], dn, ol.adconnection_alias |
286 |
new_user["userPrincipalName"], new_user["objectId"], dn, ol.adconnection_alias |
287 |
) |
287 |
) |
|
|
288 |
# update group membership for user on reactivation |
289 |
if new and old and listener.configRegistry.is_true("office365/groups/sync", False): |
290 |
for group in udm_user['groups']: |
291 |
udm_grp = ol.udm.get_udm_group(group) |
292 |
if udm_grp.get('UniventionOffice365Data'): |
293 |
azure_data = Office365Listener.decode_o365data(udm_grp['UniventionOffice365Data']) |
294 |
if ol.adconnection_alias in azure_data: |
295 |
if 'objectId' in azure_data[ol.adconnection_alias]: |
296 |
ol.ah.add_objects_to_azure_group(azure_data[ol.adconnection_alias]['objectId'], [new_user["objectId"]]) |
297 |
else: |
298 |
# TODO really? |
299 |
logger.error('need to create azure group %s' % group) |
288 |
|
300 |
|
289 |
|
301 |
|
290 |
def delete_user(ol, dn, new, old): |
302 |
def delete_user(ol, dn, new, old): |