Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/plausible_web/templates/site/settings_people.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
:update_role_by_user,
@site.domain,
membership.user.id,
"admin"
"editor"
)
}
method="put"
Expand All @@ -142,7 +142,7 @@
</p>
</div>

<%= if membership.role == :admin do %>
<%= if membership.role == "admin" do %>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently membership.role type here is inconsistent - for owner, it's an atom, for the rest, it's a string. We'll correct that on subsequent rewrite.

<span class="text-indigo-500 group-hover:text-white">
<svg
class="h-5 w-5"
Expand Down Expand Up @@ -182,7 +182,7 @@
</p>
</div>

<%= if membership.role == :viewer do %>
<%= if membership.role == "viewer" do %>
<span class="text-indigo-500 group-hover:text-white">
<svg
class="h-5 w-5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defmodule PlausibleWeb.Site.MembershipControllerTest do
conn =
post(conn, "/sites/#{site.domain}/memberships/invite", %{
email: "[email protected]",
role: "admin"
role: "editor"
})

assert html_response(conn, 200) =~
Expand All @@ -82,7 +82,7 @@ defmodule PlausibleWeb.Site.MembershipControllerTest do
conn =
post(conn, "/sites/#{site.domain}/memberships/invite", %{
email: "[email protected]",
role: "admin"
role: "editor"
})

assert conn.status == 404
Expand Down Expand Up @@ -164,7 +164,7 @@ defmodule PlausibleWeb.Site.MembershipControllerTest do
conn =
post(conn, "/sites/#{site.domain}/memberships/invite", %{
email: second_member.email,
role: "admin"
role: "editor"
})

assert html_response(conn, 200) =~
Expand Down
Loading