mirror of
https://github.com/plausible/analytics.git
synced 2024-12-23 09:33:19 +03:00
remove @plausible.io contacts from CE (#4766)
This commit is contained in:
parent
bef8b33087
commit
0ec8ac6d7c
@ -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
|
||||
|
@ -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", %{
|
||||
|
Loading…
Reference in New Issue
Block a user