remove @plausible.io contacts from CE (#4766)

This commit is contained in:
ruslandoga 2024-11-05 14:37:21 +07:00 committed by GitHub
parent bef8b33087
commit 0ec8ac6d7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 3 deletions

View File

@ -3,6 +3,7 @@ defmodule Plausible.Site do
Site schema
"""
use Ecto.Schema
use Plausible
import Ecto.Changeset
alias Plausible.Auth.User
alias Plausible.Site.GoogleAuth
@ -82,9 +83,15 @@ defmodule Plausible.Site do
def new(params), do: changeset(%__MODULE__{}, params)
@domain_unique_error """
This domain cannot be registered. Perhaps one of your colleagues registered it? If that's not the case, please contact support@plausible.io
"""
on_ee do
@domain_unique_error """
This domain cannot be registered. Perhaps one of your colleagues registered it? If that's not the case, please contact support@plausible.io
"""
else
@domain_unique_error """
This domain cannot be registered. Perhaps one of your colleagues registered it?
"""
end
def changeset(site, attrs \\ %{}) do
site

View File

@ -408,6 +408,12 @@ 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
assert html_response(conn, 200) =~ "support@plausible.io"
else
refute html_response(conn, 200) =~ "support@plausible.io"
end
end
test "renders form again when domain was changed from elsewhere", %{conn: conn} do
@ -425,6 +431,12 @@ 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
assert html_response(conn, 200) =~ "support@plausible.io"
else
refute html_response(conn, 200) =~ "support@plausible.io"
end
end
test "allows creating the site if domain was changed by the owner", %{