Skip to content

Commit

Permalink
oof
Browse files Browse the repository at this point in the history
  • Loading branch information
aerosol committed Nov 28, 2024
1 parent 088e9f1 commit 22c868e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/plausible/site/membership.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ defmodule Plausible.Site.Membership do
use Ecto.Schema
import Ecto.Changeset

@roles [:owner, :admin, :viewer]
# `editor` is only here because of dialyzer;
# since we're now querying for `Teams.Memberships.site_role`
# in `PlausibleWeb.Plugs.AuthorizeSiteAccess`
# - see all `current_user_role` references.
# They may now contain `editor` instead of `admin`.
@roles [:owner, :admin, :editor, :viewer]

@type t() :: %__MODULE__{}

Expand Down
2 changes: 1 addition & 1 deletion lib/plausible_web/templates/stats/site_locked.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
Manage my subscription
</.button_link>
</div>
<% role when role in [:admin, :viewer] -> %>
<% role when role in [:admin, :viewer, :editor] -> %>
<div class="mt-3 text-gray-600 dark:text-gray-300 text-center">
<p>
This dashboard is currently locked and cannot be accessed. The site owner
Expand Down

0 comments on commit 22c868e

Please sign in to comment.