Fix Authz API calls for group members
Fix get_group_users_api call to:
-
- Add &field=type&field=externalEmail&field=activeUserin the query -
- Filter out type=Application -
- If type=secondary, if no primaryAccountEmail retrieved: build one with upn @cern.ch(atsapcase) -
- use unconfirmedEmailifunconfirmedis true -
- check activeUserfield and iffalseuse fieldexternalEmail -
- If after all this no email found, and if secondary or primary and active and not unconfirmeduseupn@cern.ch
If all else fail and we reach the send_live_email section without an email:
- log exception to sentry
Edited by Carina Antunes