-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove @plausible.io contacts from CE (#4766)
- Loading branch information
1 parent
83106b6
commit 0a3da00
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -71,9 +72,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 [email protected] | ||
""" | ||
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 [email protected] | ||
""" | ||
else | ||
@domain_unique_error """ | ||
This domain cannot be registered. Perhaps one of your colleagues registered it? | ||
""" | ||
end | ||
|
||
def changeset(site, attrs \\ %{}) do | ||
site | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -416,6 +416,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) =~ "[email protected]" | ||
else | ||
refute html_response(conn, 200) =~ "[email protected]" | ||
end | ||
end | ||
|
||
test "renders form again when domain was changed from elsewhere", %{conn: conn} do | ||
|
@@ -433,6 +439,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) =~ "[email protected]" | ||
else | ||
refute html_response(conn, 200) =~ "[email protected]" | ||
end | ||
end | ||
|
||
test "allows creating the site if domain was changed by the owner", %{ | ||
|