Release 3.0.0 (#5309)

* Update User schema with a field required by teams migration

* Start cloak vault for self-hosted release migrations.

Since this one is using schemas, existing encrypted columns
do require cloak to be up.

* Update changelog

* Make trial notification ee-only

* Replace `Plausible.ee?/0` with `ee?/0` across the codebase

* Bump release date
This commit is contained in:
hq1 2025-04-11 10:07:57 +02:00 committed by GitHub
parent 2a18ba8f40
commit 96ebd01f00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 41 additions and 11 deletions

View File

@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
## Unreleased
### Added
### Removed
### Changed
## v3.0.0 - 2025-04-11
### Added
- Ability to sort by and compare the `exit_rate` metric in the dashboard Exit Pages > Details report
- Add top 3 pages into the traffic spike email
@ -71,7 +79,7 @@ All notable changes to this project will be documented in this file.
- Fix Conversion Rate metrics column disappearing from reports when "Goal is ..." filter is within a segment
- Graph tooltip now shows year when graph has data from multiple years
## v2.1.5-rc.1 - 2025-01-17
## v2.1.5 - 2025-02-03
### Added

View File

@ -47,6 +47,11 @@ defmodule Plausible.Auth.User do
has_many :owner_memberships, Plausible.Teams.Membership, where: [role: :owner]
has_many :owned_teams, through: [:owner_memberships, :team]
on_ce do
# we only need this for backfill teams migration to work; let's figure out how to safely remove later on
field :trial_expiry_date, :date
end
timestamps()
end

View File

@ -14,10 +14,21 @@ defmodule Plausible.DataMigration.BackfillTeams do
end
def run(opts \\ []) do
start_cloak()
dry_run? = Keyword.get(opts, :dry_run?, true)
Repo.transaction(fn -> backfill(dry_run?) end, timeout: :infinity)
end
defp start_cloak() do
Application.ensure_all_started(:cloak)
Application.ensure_all_started(:cloak_ecto)
Plausible.Auth.TOTP.Vault.start_link(key: totp_vault_key())
rescue
_ ->
:ok
end
defp backfill(dry_run?) do
# Orphaned teams
@ -614,4 +625,10 @@ defmodule Plausible.DataMigration.BackfillTeams do
defp log(msg) do
IO.puts("[#{DateTime.utc_now(:second)}] #{msg}")
end
defp totp_vault_key() do
:plausible
|> Application.fetch_env!(Plausible.Auth.TOTP)
|> Keyword.fetch!(:vault_key)
end
end

View File

@ -554,7 +554,7 @@ defmodule PlausibleWeb.Email do
def priority_email(%{layout: layout}) do
email = base_email(%{layout: layout})
if Plausible.ee?() do
if ee?() do
put_param(email, "MessageStream", "priority")
else
email

View File

@ -1,10 +1,10 @@
You've activated
<%= if Plausible.ee?() do %>
<%= if ee?() do %>
your free 30-day trial of
<% end %>
{Plausible.product_name()}, a simple and privacy-friendly website analytics tool. <br /><br />
<a href={"#{plausible_url()}/sites/new"}>Click here</a>
to add your website URL, your timezone and install our one-line JavaScript snippet to start collecting visitor statistics.
<%= if Plausible.ee?() do %>
<%= if ee?() do %>
<br /><br />Do reply back to this email if you have any questions or need some guidance.
<% end %>

View File

@ -1,4 +1,4 @@
<%= if Plausible.ee?() and Plausible.Teams.on_trial?(@site_team) do %>
<%= if ee?() and Plausible.Teams.on_trial?(@site_team) do %>
You signed up for a free 30-day trial of Plausible, a simple and privacy-friendly website analytics tool.
<br /><br />
<% end %>
@ -9,6 +9,6 @@ This Plausible script is 45 times smaller than Google Analytics script so you
<br /><br /> On WordPress? We have a
<a href="https://plausible.io/wordpress-analytics-plugin">WordPress plugin</a> that makes the process simpler. We also have
<a href="https://plausible.io/docs/integration-guides">integration guides</a> for different site builders to help you start counting stats in no time.
<%= if Plausible.ee?() do %>
<%= if ee?() do %>
<br /><br /> Do reply back to this email if you have any questions or need some guidance.
<% end %>

View File

@ -14,7 +14,7 @@
resource="sites"
/>
<%= if is_nil(@current_team) or is_nil(@current_team.trial_expiry_date) do %>
<%= if ee?() and (is_nil(@current_team) or is_nil(@current_team.trial_expiry_date)) do %>
<div class="rounded-md bg-blue-50 dark:bg-transparent dark:border border-blue-200 p-4">
<div class="flex">
<div class="flex-shrink-0">

View File

@ -162,7 +162,7 @@ defmodule PlausibleWeb.BillingControllerTest do
assert %{
"disableLogout" => true,
"email" => user.email,
"passthrough" => "ee:#{Plausible.ee?()};user:#{user.id};team:#{team.id}",
"passthrough" => "ee:#{ee?()};user:#{user.id};team:#{team.id}",
"product" => @configured_enterprise_plan_paddle_plan_id,
"success" => Routes.billing_path(PlausibleWeb.Endpoint, :upgrade_success),
"theme" => "none"
@ -337,7 +337,7 @@ defmodule PlausibleWeb.BillingControllerTest do
assert %{
"disableLogout" => true,
"email" => user.email,
"passthrough" => "ee:#{Plausible.ee?()};user:#{user.id};team:#{team.id}",
"passthrough" => "ee:#{ee?()};user:#{user.id};team:#{team.id}",
"product" => @configured_enterprise_plan_paddle_plan_id,
"success" => Routes.billing_path(PlausibleWeb.Endpoint, :upgrade_success),
"theme" => "none"

View File

@ -430,7 +430,7 @@ defmodule PlausibleWeb.SiteControllerTest do
assert html_response(conn, 200) =~
"This domain cannot be registered. Perhaps one of your colleagues registered it?"
if Plausible.ee?() do
if ee?() do
assert html_response(conn, 200) =~ "support@plausible.io"
else
refute html_response(conn, 200) =~ "support@plausible.io"
@ -453,7 +453,7 @@ defmodule PlausibleWeb.SiteControllerTest do
assert html_response(conn, 200) =~
"This domain cannot be registered. Perhaps one of your colleagues registered it?"
if Plausible.ee?() do
if ee?() do
assert html_response(conn, 200) =~ "support@plausible.io"
else
refute html_response(conn, 200) =~ "support@plausible.io"