def visible_tenants(self, recurse=True): tenant_uuid = Tenant.autodetect().uuid if recurse: return [ tenant.uuid for tenant in token.visible_tenants(tenant_uuid) ] else: return [tenant_uuid]
def _build_tenant_list(self, params): if not self._has_a_tenant_uuid(): return tenant_uuid = Tenant.autodetect().uuid if not params.get('recurse', False): return [tenant_uuid] return [tenant.uuid for tenant in token.visible_tenants(tenant_uuid)]
def query_or_header_visible_tenants(self, recurse=True): self._set_up_token_helper_to_verify_tenant() tenant_uuid = Tenant.autodetect(include_query=True).uuid if recurse: return [ tenant.uuid for tenant in token.visible_tenants(tenant_uuid) ] else: return [tenant_uuid]
def get_tenant_uuids(recurse=False): tenant_uuid = Tenant.autodetect().uuid if not recurse: return [tenant_uuid] return [tenant.uuid for tenant in token.visible_tenants(tenant_uuid)]
def _build_tenant_list(self, params): tenant_uuid = Tenant.autodetect().uuid recurse = params.get('recurse', False) if not recurse: return [tenant_uuid] return [tenant.uuid for tenant in token.visible_tenants(tenant_uuid)]