First
[anni] / lib / pleroma / web / plugs / expect_public_or_authenticated_check_plug.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.Plugs.ExpectPublicOrAuthenticatedCheckPlug do
6   @moduledoc """
7   Marks `Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug` as expected to be executed later in plug
8   chain.
9
10   No-op plug which affects `Pleroma.Web` operation (is checked with `PlugHelper.plug_called?/2`).
11   """
12
13   use Pleroma.Web, :plug
14
15   def init(options), do: options
16
17   @impl true
18   def perform(conn, _) do
19     conn
20   end
21 end