Fix Authz API calls for group members
Fix get_group_users_api call to:
-
- Add &field=type&field=externalEmail&field=activeUser
in the query -
- Filter out type=Application -
- If type=secondary, if no primaryAccountEmail retrieved: build one with upn @cern.ch
(atsap
case) -
- use unconfirmedEmail
ifunconfirmed
is true -
- check activeUser
field and iffalse
use fieldexternalEmail
-
- If after all this no email found, and if secondary or primary and active and not unconfirmed
useupn@cern.ch
If all else fail and we reach the send_live_email
section without an email:
- log exception to sentry