The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
(ns metabase-enterprise.analytics.stats
(:require
[metabase-enterprise.advanced-config.settings :as advanced-config.settings]
[metabase-enterprise.analytics.db :as analytics.db]
[metabase-enterprise.mfa.core :as mfa]
[metabase-enterprise.scim.core :as scim]
[metabase-enterprise.search.semantic.core :as semantic-search]
[metabase-enterprise.sso.settings :as ee-sso-settings]
[metabase.driver :as driver]
[metabase.premium-features.core :as premium-features :refer [defenterprise]]))
(defenterprise ee-snowplow-features-data
"A subset of feature information included in the daily Snowplow stats report. This function only returns information
about features which require calling EE code; other features are defined in [[metabase.analytics.stats/snowplow-features]]"
:feature :none
[]
[{:name :sso-jwt
:available (premium-features/enable-sso-jwt?)
:enabled (ee-sso-settings/jwt-enabled-and-configured)}
{:name :sso-saml
:available (premium-features/enable-sso-saml?)
:enabled (ee-sso-settings/saml-enabled)}
{:name :scim
:available (premium-features/enable-scim?)
:enabled (boolean (scim/scim-enabled))}
;; the `and` upholds this ping's enabled⊆available invariant: MFA enforcement survives a
;; license lapse (fail-closed), so mfa-enabled? alone can be true on an unlicensed instance
{:name :multi-factor-auth
:available (premium-features/enable-multi-factor-auth?)
:enabled (and (premium-features/enable-multi-factor-auth?)
(mfa/mfa-enabled?))}
{:name :sandboxes
:available (and (premium-features/enable-official-collections?)
(analytics.db/database-with-engine-exists? (descendants driver/hierarchy :sql)))
:enabled (analytics.db/sandbox-exists?)}
{:name :email-allow-list
:available (premium-features/enable-email-allow-list?)
:enabled (some? (advanced-config.settings/subscription-allowed-domains))}
{:name :semantic-search
:available (premium-features/enable-semantic-search?)
:enabled (semantic-search/supported?)}])