Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

912 B
Raw Blame
"""Django app configuration for access_control."""

from django.apps import AppConfig


class AccessControlConfig(AppConfig):
    name = "products.access_control.backend"
    label = "access_control"

    def ready(self) -> None:
        # Connect the restriction-cache invalidation receivers at app-population. They used to be
        # wired as a side effect of the HogQL printer importing this module at django.setup();
        # that import is now deferred to compile time, so the wiring must happen here or the
        # receivers connect in no process and cache invalidation silently stops.
        # Rules are written from the API and from product code in workers, so the audit
        # receiver must connect in every process.
        from products.access_control.backend import (
            activity_logging,  # noqa: F401, PLC0415
            property_access_control,  # noqa: F401, PLC0415
        )