diff --git a/sram.py b/sram.py index 0dce48962..3bd0e8c71 100644 --- a/sram.py +++ b/sram.py @@ -26,6 +26,10 @@ def sram_post_collaboration(ctx, group_name, description): url = "{}/api/collaborations/v1".format(config.sram_rest_api_url) headers = {'Content-Type': 'application/json', 'charset': 'UTF-8', 'Authorization': 'bearer ' + config.sram_api_key} + group_type = '' + if group_name.split('-')[0] in ('research', 'datamanager', 'priv', 'deposit'): + group_type = group_name.split('-')[0] + disable_join_requests = True if config.sram_flow == 'join_request': disable_join_requests = False @@ -38,7 +42,8 @@ def sram_post_collaboration(ctx, group_name, description): "disclose_member_information": True, "disclose_email_information": True, "administrators": [session_vars.get_map(ctx.rei)["client_user"]["user_name"]], - "logo": config.sram_co_logo_url + "logo": config.sram_co_logo_url, + "tags": [config.sram_co_default_label, group_type] } if config.sram_verbose_logging: diff --git a/util/config.py b/util/config.py index f44ba68a5..994bc7d00 100644 --- a/util/config.py +++ b/util/config.py @@ -135,6 +135,7 @@ def __repr__(self): sram_flow=None, sram_verbose_logging=False, sram_tls_verify=True, + sram_co_default_label=None, sram_co_logo_url=None, arb_enabled=False, arb_exempt_resources=[],