mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 18:07:17 +01:00
259e801de6
* Fix unix-dgram build * Add per-organization whitelisting of plugins API on Cloud * Add migration * Update can_install_plugins_via_api calls in serializer * Remove unused type: ignore * Update PluginSerializer for organization_id * Make Plugin.organization nullable * Fix can_install_plugins_via_api * Update pluginsLogic.ts * Adjust can_configure_plugins_via_api for organization * Don't include organization_id in serializer * Set default Plugin.organization to first Organization in instance * Fix PluginConfigSerializer.create * Test that other orgs' plugins can't be accessed (as if they didn't exist, 404) * fix typo Co-authored-by: Marius Andra <marius.andra@gmail.com>
26 lines
901 B
Python
26 lines
901 B
Python
"""
|
|
Django settings for PostHog Enterprise Edition.
|
|
"""
|
|
import os
|
|
from typing import Dict, List
|
|
|
|
from posthog.constants import RDBMS
|
|
from posthog.settings import PRIMARY_DB, TEST
|
|
|
|
# Zapier
|
|
HOOK_EVENTS: Dict[str, str] = {
|
|
# "event_name": "App.Model.Action" (created/updated/deleted)
|
|
"action_defined": "posthog.Action.created_custom",
|
|
"action_performed": "posthog.Action.performed",
|
|
"annotation_created": "posthog.Annotation.created_custom",
|
|
}
|
|
HOOK_FINDER = "ee.models.hook.find_and_fire_hook"
|
|
HOOK_DELIVERER = "ee.models.hook.deliver_hook_wrapper"
|
|
|
|
KAFKA_ENABLED = PRIMARY_DB == RDBMS.CLICKHOUSE and not TEST
|
|
|
|
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = os.environ.get("SOCIAL_AUTH_GOOGLE_OAUTH2_KEY")
|
|
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = os.environ.get("SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET")
|
|
|
|
PLUGINS_CLOUD_WHITELISTED_ORG_IDS: List[str] = os.getenv("PLUGINS_CLOUD_WHITELISTED_ORG_IDS", "").split(",")
|