diff --git a/arlas/cli/service.py b/arlas/cli/service.py index bdef180..5d4113a 100644 --- a/arlas/cli/service.py +++ b/arlas/cli/service.py @@ -272,6 +272,10 @@ def create_collection(arlas: str, collection: str, model_resource: str, index: s model = {} if index: model["index_name"] = index + if not owner: + configuration: ARLAS = Configuration.settings.arlas.get(arlas, None) + if configuration and configuration.authorization and configuration.authorization.token_url and configuration.authorization.token_url.headers and configuration.authorization.token_url.headers.get("arlas-org-filter"): + owner = configuration.authorization.token_url.headers.get("arlas-org-filter") if owner: model["organisations"] = { "owner": owner,