mirror of
https://github.com/plausible/analytics.git
synced 2024-09-11 09:56:02 +03:00
Remove two_factor
feature flag (#3597)
* Remove `two_factor` feature flag * Avoid compilation warnings in small build
This commit is contained in:
parent
0eedf9aa98
commit
12f786810c
@ -1,5 +1,6 @@
|
||||
defmodule Plausible.Auth.UserAdmin do
|
||||
use Plausible.Repo
|
||||
use Plausible
|
||||
require Plausible.Billing.Subscription.Status
|
||||
alias Plausible.Billing.Subscription
|
||||
|
||||
@ -117,9 +118,13 @@ defmodule Plausible.Auth.UserAdmin do
|
||||
end
|
||||
end
|
||||
|
||||
defp usage_link(user) do
|
||||
path = PlausibleWeb.Router.Helpers.admin_path(PlausibleWeb.Endpoint, :usage, user.id)
|
||||
{:safe, ~s(<a href="#{path}">Usage</a>)}
|
||||
on_full_build do
|
||||
defp usage_link(user) do
|
||||
path = PlausibleWeb.Router.Helpers.admin_path(PlausibleWeb.Endpoint, :usage, user.id)
|
||||
{:safe, ~s(<a href="#{path}">Usage</a>)}
|
||||
end
|
||||
else
|
||||
defp usage_link(_), do: nil
|
||||
end
|
||||
|
||||
defp format_date(nil), do: "--"
|
||||
|
@ -193,10 +193,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div
|
||||
:if={FunWithFlags.enabled?(:two_factor, for: @user)}
|
||||
class="max-w-2xl px-8 pt-6 pb-8 mx-auto mt-16 bg-white border-t-2 border-green-500 rounded rounded-t-none shadow-md dark:bg-gray-800"
|
||||
>
|
||||
<div class="max-w-2xl px-8 pt-6 pb-8 mx-auto mt-16 bg-white border-t-2 border-green-500 rounded rounded-t-none shadow-md dark:bg-gray-800">
|
||||
<h2 id="setup-2fa" class="text-xl font-black dark:text-gray-100">
|
||||
Two-Factor Authentication (2FA)
|
||||
</h2>
|
||||
@ -420,7 +417,6 @@
|
||||
|
||||
<PlausibleWeb.Components.TwoFactor.modal
|
||||
:let={f}
|
||||
:if={FunWithFlags.enabled?(:two_factor, for: @user)}
|
||||
id="disable-2fa-modal"
|
||||
state_param="disable2FAOpen"
|
||||
form_data={@conn.params}
|
||||
@ -457,7 +453,6 @@
|
||||
|
||||
<PlausibleWeb.Components.TwoFactor.modal
|
||||
:let={f}
|
||||
:if={FunWithFlags.enabled?(:two_factor, for: @user)}
|
||||
id="regenerate-2fa-modal"
|
||||
state_param="regenerate2FAOpen"
|
||||
form_data={@conn.params}
|
||||
|
@ -10,8 +10,6 @@
|
||||
# We recommend using the bang functions (`insert!`, `update!`
|
||||
# and so on) as they will fail if something goes wrong.
|
||||
|
||||
FunWithFlags.enable(:two_factor)
|
||||
|
||||
user = Plausible.Factory.insert(:user, email: "user@plausible.test", password: "plausible")
|
||||
|
||||
native_stats_range =
|
||||
|
@ -3,7 +3,6 @@ Mox.defmock(Plausible.HTTPClient.Mock, for: Plausible.HTTPClient.Interface)
|
||||
Application.ensure_all_started(:double)
|
||||
FunWithFlags.enable(:business_tier)
|
||||
FunWithFlags.enable(:window_time_on_page)
|
||||
FunWithFlags.enable(:two_factor)
|
||||
Ecto.Adapters.SQL.Sandbox.mode(Plausible.Repo, :manual)
|
||||
|
||||
if Mix.env() == :small_test do
|
||||
|
Loading…
Reference in New Issue
Block a user