summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-05-23 13:27:09 -0500
committerAlex Gleason <alex@alexgleason.me>2021-05-23 13:27:09 -0500
commit785eec84c57704af45c4cc141f6960fcaf630110 (patch)
treea4c87d2c3a7d300d6283a73a9b345cf87683865d
parent38bda7a0475b9f2a904b3ee93b6c4bd48f73ca20 (diff)
Cycles: fix cycle in lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex
-rw-r--r--lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex b/lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex
index 8a8532f41..ffc546e1b 100644
--- a/lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex
+++ b/lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex
@@ -12,7 +12,6 @@ defmodule Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug do
import Plug.Conn
alias Pleroma.Config
- alias Pleroma.User
use Pleroma.Web, :plug
@@ -28,7 +27,7 @@ defmodule Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug do
{true, _} ->
conn
- {false, %{assigns: %{user: %User{}}}} ->
+ {false, %{assigns: %{user: user}}} when is_struct(user) ->
conn
{false, _} ->