mirror of
https://github.com/plausible/analytics.git
synced 2024-12-22 17:11:36 +03:00
Fix membership role action and checks under Site Settings > People (#4910)
This commit is contained in:
parent
7f3e91e1cc
commit
2938936c4c
@ -127,7 +127,7 @@
|
||||
:update_role_by_user,
|
||||
@site.domain,
|
||||
membership.user.id,
|
||||
"admin"
|
||||
"editor"
|
||||
)
|
||||
}
|
||||
method="put"
|
||||
@ -142,7 +142,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= if membership.role == :admin do %>
|
||||
<%= if membership.role == "admin" do %>
|
||||
<span class="text-indigo-500 group-hover:text-white">
|
||||
<svg
|
||||
class="h-5 w-5"
|
||||
@ -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"
|
||||
|
@ -68,7 +68,7 @@ defmodule PlausibleWeb.Site.MembershipControllerTest do
|
||||
conn =
|
||||
post(conn, "/sites/#{site.domain}/memberships/invite", %{
|
||||
email: "john.doe@example.com",
|
||||
role: "admin"
|
||||
role: "editor"
|
||||
})
|
||||
|
||||
assert html_response(conn, 200) =~
|
||||
@ -82,7 +82,7 @@ defmodule PlausibleWeb.Site.MembershipControllerTest do
|
||||
conn =
|
||||
post(conn, "/sites/#{site.domain}/memberships/invite", %{
|
||||
email: "john.doe@example.com",
|
||||
role: "admin"
|
||||
role: "editor"
|
||||
})
|
||||
|
||||
assert conn.status == 404
|
||||
@ -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) =~
|
||||
|
Loading…
Reference in New Issue
Block a user