Shields behind a FF (#3780)

This commit is contained in:
hq1 2024-02-12 15:22:06 +01:00 committed by GitHub
parent 99fe03701e
commit 494ffbd622
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,9 @@ defmodule PlausibleWeb.LayoutView do
end,
[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]

View File

@ -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