Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Shields behind a FF (#3780)
hq1494ffbd62222
diff --git a/lib/plausible_web/views/layout_view.ex b/lib/plausible_web/views/layout_view.exindex 57307a5bf3..f122044178 100644--- a/lib/plausible_web/views/layout_view.ex+++ b/lib/plausible_web/views/layout_view.ex@@ -51,7 +51,9 @@ defmodule PlausibleWeb.LayoutView doend,[key: "Custom Properties", value: "properties", icon: :document_text],[key: "Integrations", value: "integrations", icon: :arrow_path_rounded_square],- [key: "Shields", value: "shields", icon: :shield_exclamation],+ if FunWithFlags.enabled?(:shields, for: conn.assigns[:current_user]) do+ [key: "Shields", value: "shields", icon: :shield_exclamation]+ end,[key: "Email Reports", value: "email-reports", icon: :envelope],if conn.assigns[:current_user_role] == :owner do[key: "Danger Zone", value: "danger-zone", icon: :exclamation_triangle]diff --git a/test/test_helper.exs b/test/test_helper.exsindex 30f0ebbd59..7cbd300df1 100644--- a/test/test_helper.exs+++ b/test/test_helper.exs@@ -2,6 +2,7 @@Mox.defmock(Plausible.HTTPClient.Mock, for: Plausible.HTTPClient.Interface)Application.ensure_all_started(:double)FunWithFlags.enable(:window_time_on_page)+FunWithFlags.enable(:shields)Ecto.Adapters.SQL.Sandbox.mode(Plausible.Repo, :manual)if Mix.env() == :small_test do