MCPcopy
hub / github.com/Flagsmith/flagsmith / warn_insecure

Function warn_insecure

api/users/signals.py:11–18  ·  view source on GitHub ↗
(sender, **kwargs)

Source from the content-addressed store, hash-verified

9
10@receiver(post_migrate, sender=FFAdminUser)
11def warn_insecure(sender, **kwargs): # type: ignore[no-untyped-def]
12 if sender.objects.count() == 0:
13 path = reverse("api-v1:users:config-init")
14 warnings.warn(
15 f"YOUR INSTALLATION IS INSECURE: PLEASE ACCESS http://<your-server-domain:8000>{path}"
16 " TO CREATE A SUPER USER",
17 RuntimeWarning,
18 )

Calls 1

reverseFunction · 0.50