FederatingPlug module name
This commit is contained in:
parent
abc3c7689b
commit
8c993c5f63
|
@ -23,7 +23,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|
|||
alias Pleroma.Web.ActivityPub.Visibility
|
||||
alias Pleroma.Web.ControllerHelper
|
||||
alias Pleroma.Web.Endpoint
|
||||
alias Pleroma.Web.FederatingPlug
|
||||
alias Pleroma.Web.Plugs.FederatingPlug
|
||||
alias Pleroma.Web.Federator
|
||||
|
||||
require Logger
|
||||
|
|
|
@ -17,7 +17,7 @@ defmodule Pleroma.Web.OStatus.OStatusController do
|
|||
alias Pleroma.Web.Router
|
||||
|
||||
plug(Pleroma.Plugs.EnsureAuthenticatedPlug,
|
||||
unless_func: &Pleroma.Web.FederatingPlug.federating?/1
|
||||
unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
|
||||
)
|
||||
|
||||
plug(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.FederatingPlug do
|
||||
defmodule Pleroma.Web.Plugs.FederatingPlug do
|
||||
import Plug.Conn
|
||||
|
||||
def init(options) do
|
||||
|
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
|
|||
plug(:assign_id)
|
||||
|
||||
plug(Pleroma.Plugs.EnsureAuthenticatedPlug,
|
||||
unless_func: &Pleroma.Web.FederatingPlug.federating?/1
|
||||
unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
|
||||
)
|
||||
|
||||
@page_keys ["max_id", "min_id", "limit", "since_id", "order"]
|
||||
|
|
|
@ -17,7 +17,7 @@ defmodule Pleroma.Web.TwitterAPI.RemoteFollowController do
|
|||
|
||||
@status_types ["Article", "Event", "Note", "Video", "Page", "Question"]
|
||||
|
||||
plug(Pleroma.Web.FederatingPlug)
|
||||
plug(Pleroma.Web.Plugs.FederatingPlug)
|
||||
|
||||
# Note: follower can submit the form (with password auth) not being signed in (having no token)
|
||||
plug(
|
||||
|
|
|
@ -16,7 +16,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
|
|||
alias Pleroma.Web.CommonAPI
|
||||
alias Pleroma.Web.WebFinger
|
||||
|
||||
plug(Pleroma.Web.FederatingPlug when action == :remote_subscribe)
|
||||
plug(Pleroma.Web.Plugs.FederatingPlug when action == :remote_subscribe)
|
||||
|
||||
plug(
|
||||
OAuthScopesPlug,
|
||||
|
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerController do
|
|||
alias Pleroma.Web.WebFinger
|
||||
|
||||
plug(Pleroma.Web.Plugs.SetFormatPlug)
|
||||
plug(Pleroma.Web.FederatingPlug)
|
||||
plug(Pleroma.Web.Plugs.FederatingPlug)
|
||||
|
||||
def host_meta(conn, _params) do
|
||||
xml = WebFinger.host_meta()
|
||||
|
|
|
@ -12,7 +12,7 @@ test "returns and halt the conn when federating is disabled" do
|
|||
|
||||
conn =
|
||||
build_conn()
|
||||
|> Pleroma.Web.FederatingPlug.call(%{})
|
||||
|> Pleroma.Web.Plugs.FederatingPlug.call(%{})
|
||||
|
||||
assert conn.status == 404
|
||||
assert conn.halted
|
||||
|
@ -23,7 +23,7 @@ test "does nothing when federating is enabled" do
|
|||
|
||||
conn =
|
||||
build_conn()
|
||||
|> Pleroma.Web.FederatingPlug.call(%{})
|
||||
|> Pleroma.Web.Plugs.FederatingPlug.call(%{})
|
||||
|
||||
refute conn.status
|
||||
refute conn.halted
|
||||
|
|
Loading…
Reference in New Issue