diff --git a/sram.py b/sram.py index 1b3b26004..8ea2c5462 100644 --- a/sram.py +++ b/sram.py @@ -36,12 +36,16 @@ def sram_post_collaboration(ctx, group_name, description, expiration_date): epoch = datetime.datetime.utcfromtimestamp(0) epoch_date = int((date - epoch).total_seconds()) + disable_join_requests = True + if config.sram_flow == 'join_request': + disable_join_requests = False + # Build SRAM payload. payload = { "name": 'yoda-' + group_name, "short_name": group_name, "description": description, - "disable_join_requests": False, + "disable_join_requests": disable_join_requests, "disclose_member_information": True, "disclose_email_information": True, "expiry_date": epoch_date,