Skip to content

Commit

Permalink
SRAM: don't invite users with an invalid email
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Nov 21, 2023
1 parent b328e1d commit ce4dbd5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,8 +1354,7 @@ def rule_group_sram_sync(ctx):
# Validate email
if not yoda_names.is_email_username(member):
log.write(ctx, "User {} cannot be added to group {} because user email is invalid".format(member, group_name))

if config.sram_flow == 'join_request':
elif config.sram_flow == 'join_request':
sram.invitation_mail_group_add_user(ctx, group_name, member.split('#')[0], co_identifier)
elif config.sram_flow == 'invitation':
sram.sram_put_collaboration_invitation(ctx, group_name, member.split('#')[0], co_identifier)
Expand Down

0 comments on commit ce4dbd5

Please sign in to comment.