diff --git a/engine/apps/api/tests/test_features.py b/engine/apps/api/tests/test_features.py index 5c393b4f..53da7481 100644 --- a/engine/apps/api/tests/test_features.py +++ b/engine/apps/api/tests/test_features.py @@ -35,7 +35,7 @@ def test_select_features_all_enabled( make_user_auth_headers, ): organization, user, token = make_organization_and_user_with_plugin_token() - settings.OSS = True + settings.OSS_INSTALLATION = True settings.FEATURE_SLACK_INTEGRATION_ENABLED = True settings.FEATURE_TELEGRAM_INTEGRATION_ENABLED = True settings.FEATURE_LIVE_SETTINGS_ENABLED = True @@ -55,7 +55,7 @@ def test_select_features_all_disabled( make_user_auth_headers, ): organization, user, token = make_organization_and_user_with_plugin_token() - settings.OSS = False + settings.OSS_INSTALLATIONs = False settings.FEATURE_SLACK_INTEGRATION_ENABLED = False settings.FEATURE_TELEGRAM_INTEGRATION_ENABLED = False settings.FEATURE_LIVE_SETTINGS_ENABLED = False diff --git a/engine/apps/api/views/features.py b/engine/apps/api/views/features.py index 4f106a89..805308a9 100644 --- a/engine/apps/api/views/features.py +++ b/engine/apps/api/views/features.py @@ -48,7 +48,7 @@ class FeaturesAPIView(APIView): if request.auth.organization.pk in mobile_app_settings.json_value["org_ids"]: enabled_features.append(MOBILE_APP_PUSH_NOTIFICATIONS) - if settings.OSS: + if settings.OSS_INSTALLATION: # Features below should be enabled only in OSS enabled_features.append(FEATURE_GRAFANA_CLOUD_CONNECTION) if settings.FEATURE_LIVE_SETTINGS_ENABLED: diff --git a/engine/engine/urls.py b/engine/engine/urls.py index d2eda753..518c5608 100644 --- a/engine/engine/urls.py +++ b/engine/engine/urls.py @@ -54,7 +54,7 @@ if settings.FEATURE_SLACK_INTEGRATION_ENABLED: path("slack/", include("apps.slack.urls")), ] -if settings.OSS: +if settings.OSS_INSTALLATION: urlpatterns += [ path("api/internal/v1/", include("apps.oss_installation.urls")), ] diff --git a/engine/settings/base.py b/engine/settings/base.py index 507ae112..0495440e 100644 --- a/engine/settings/base.py +++ b/engine/settings/base.py @@ -6,7 +6,9 @@ from celery.schedules import crontab from common.utils import getenv_boolean VERSION = "dev-oss" -OSS = getenv_boolean("OSS", True) +# Indicates if instance is OSS installation. +# It is needed to plug-in oss urls. +OSS_INSTALLATION = getenv_boolean("OSS", False) SEND_ANONYMOUS_USAGE_STATS = getenv_boolean("SEND_ANONYMOUS_USAGE_STATS", default=True) # License is OpenSource or Cloud