projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
011525a
)
EnsureAuthenticatedPlug module name
author
Alexander Strizhakov
<alex.strizhakov@gmail.com>
Wed, 24 Jun 2020 07:55:56 +0000
(10:55 +0300)
committer
Alexander Strizhakov
<alex.strizhakov@gmail.com>
Tue, 13 Oct 2020 13:43:57 +0000
(16:43 +0300)
lib/pleroma/web.ex
patch
|
blob
|
history
lib/pleroma/web/activity_pub/activity_pub_controller.ex
patch
|
blob
|
history
lib/pleroma/web/feed/user_controller.ex
patch
|
blob
|
history
lib/pleroma/web/o_status/o_status_controller.ex
patch
|
blob
|
history
lib/pleroma/web/plugs/ensure_authenticated_plug.ex
patch
|
blob
|
history
lib/pleroma/web/plugs/expect_authenticated_check_plug.ex
patch
|
blob
|
history
lib/pleroma/web/router.ex
patch
|
blob
|
history
lib/pleroma/web/static_fe/static_fe_controller.ex
patch
|
blob
|
history
test/pleroma/web/plugs/ensure_authenticated_plug_test.exs
patch
|
blob
|
history
diff --git
a/lib/pleroma/web.ex
b/lib/pleroma/web.ex
index 667ef67a80b3f7f0b442954007c288e164adc860..7779826e3e1a6a1696e35e0c81be517d23e91939 100644
(file)
--- a/
lib/pleroma/web.ex
+++ b/
lib/pleroma/web.ex
@@
-20,7
+20,7
@@
defmodule Pleroma.Web do
below.
"""
below.
"""
- alias Pleroma.Plugs.EnsureAuthenticatedPlug
+ alias Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug
alias Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug
alias Pleroma.Web.Plugs.ExpectAuthenticatedCheckPlug
alias Pleroma.Web.Plugs.ExpectPublicOrAuthenticatedCheckPlug
alias Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug
alias Pleroma.Web.Plugs.ExpectAuthenticatedCheckPlug
alias Pleroma.Web.Plugs.ExpectPublicOrAuthenticatedCheckPlug
diff --git
a/lib/pleroma/web/activity_pub/activity_pub_controller.ex
b/lib/pleroma/web/activity_pub/activity_pub_controller.ex
index 5de51c0c765384c18fe3d3e78c7b339544e13c55..4bdb2e38bfeabbdee85d916298e858327c15934e 100644
(file)
--- a/
lib/pleroma/web/activity_pub/activity_pub_controller.ex
+++ b/
lib/pleroma/web/activity_pub/activity_pub_controller.ex
@@
-9,7
+9,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubController do
alias Pleroma.Delivery
alias Pleroma.Object
alias Pleroma.Object.Fetcher
alias Pleroma.Delivery
alias Pleroma.Object
alias Pleroma.Object.Fetcher
- alias Pleroma.Plugs.EnsureAuthenticatedPlug
+ alias Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Builder
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Builder
diff --git
a/lib/pleroma/web/feed/user_controller.ex
b/lib/pleroma/web/feed/user_controller.ex
index 6aad6af44effb6e497d94d612f7fd5d700f8a7a5..1ecb8fda64d05acb0feb3e6f6e4da2b6379c6f5a 100644
(file)
--- a/
lib/pleroma/web/feed/user_controller.ex
+++ b/
lib/pleroma/web/feed/user_controller.ex
@@
-23,7
+23,7
@@
defmodule Pleroma.Web.Feed.UserController do
def feed_redirect(%{assigns: %{format: format}} = conn, _params)
when format in ["json", "activity+json"] do
with %{halted: false} = conn <-
def feed_redirect(%{assigns: %{format: format}} = conn, _params)
when format in ["json", "activity+json"] do
with %{halted: false} = conn <-
- Pleroma.Plugs.EnsureAuthenticatedPlug.call(conn,
+ Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug.call(conn,
unless_func: &Pleroma.Web.FederatingPlug.federating?/1
) do
ActivityPubController.call(conn, :user)
unless_func: &Pleroma.Web.FederatingPlug.federating?/1
) do
ActivityPubController.call(conn, :user)
diff --git
a/lib/pleroma/web/o_status/o_status_controller.ex
b/lib/pleroma/web/o_status/o_status_controller.ex
index f6069e4f3ee70f7d0f1c44200da1d3096218f14e..b058200f1e5962df66502693ddb0a2aca17e5976 100644
(file)
--- a/
lib/pleroma/web/o_status/o_status_controller.ex
+++ b/
lib/pleroma/web/o_status/o_status_controller.ex
@@
-16,7
+16,7
@@
defmodule Pleroma.Web.OStatus.OStatusController do
alias Pleroma.Web.Metadata.PlayerView
alias Pleroma.Web.Router
alias Pleroma.Web.Metadata.PlayerView
alias Pleroma.Web.Router
- plug(Pleroma.Plugs.EnsureAuthenticatedPlug,
+ plug(Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug,
unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
)
unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
)
diff --git
a/lib/pleroma/web/plugs/ensure_authenticated_plug.ex
b/lib/pleroma/web/plugs/ensure_authenticated_plug.ex
index 3fe5508060730e6d40f96860ad774e42896af65d..ea2af6881ff801ecd1b2af85c6bb9b0cef9067ed 100644
(file)
--- a/
lib/pleroma/web/plugs/ensure_authenticated_plug.ex
+++ b/
lib/pleroma/web/plugs/ensure_authenticated_plug.ex
@@
-2,7
+2,7
@@
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.Plugs.EnsureAuthenticatedPlug do
+defmodule Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug do
import Plug.Conn
import Pleroma.Web.TranslationHelpers
import Plug.Conn
import Pleroma.Web.TranslationHelpers
diff --git
a/lib/pleroma/web/plugs/expect_authenticated_check_plug.ex
b/lib/pleroma/web/plugs/expect_authenticated_check_plug.ex
index 1fa742717210e9a5823bb92a31dd26269a39e7a5..0925ded4d791bf9dfbca9b6182a8de8de8f69517 100644
(file)
--- a/
lib/pleroma/web/plugs/expect_authenticated_check_plug.ex
+++ b/
lib/pleroma/web/plugs/expect_authenticated_check_plug.ex
@@
-4,7
+4,7
@@
defmodule Pleroma.Web.Plugs.ExpectAuthenticatedCheckPlug do
@moduledoc """
defmodule Pleroma.Web.Plugs.ExpectAuthenticatedCheckPlug do
@moduledoc """
- Marks `Pleroma.Plugs.EnsureAuthenticatedPlug` as expected to be executed later in plug chain.
+ Marks `Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug` as expected to be executed later in plug chain.
No-op plug which affects `Pleroma.Web` operation (is checked with `PlugHelper.plug_called?/2`).
"""
No-op plug which affects `Pleroma.Web` operation (is checked with `PlugHelper.plug_called?/2`).
"""
diff --git
a/lib/pleroma/web/router.ex
b/lib/pleroma/web/router.ex
index 6dc7a777b229ac1fa381cdafadae091792c6d6bb..524674e1aaa206c6c205c9b4dc2145ea11c88b2c 100644
(file)
--- a/
lib/pleroma/web/router.ex
+++ b/
lib/pleroma/web/router.ex
@@
-57,7
+57,7
@@
defmodule Pleroma.Web.Router do
plug(:expect_authentication)
plug(:base_api)
plug(:after_auth)
plug(:expect_authentication)
plug(:base_api)
plug(:after_auth)
- plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
+ plug(Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug)
plug(Pleroma.Web.Plugs.IdempotencyPlug)
end
plug(Pleroma.Web.Plugs.IdempotencyPlug)
end
@@
-66,7
+66,7
@@
defmodule Pleroma.Web.Router do
plug(:base_api)
plug(Pleroma.Plugs.AdminSecretAuthenticationPlug)
plug(:after_auth)
plug(:base_api)
plug(Pleroma.Plugs.AdminSecretAuthenticationPlug)
plug(:after_auth)
- plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
+ plug(Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug)
plug(Pleroma.Web.Plugs.UserIsAdminPlug)
plug(Pleroma.Web.Plugs.IdempotencyPlug)
end
plug(Pleroma.Web.Plugs.UserIsAdminPlug)
plug(Pleroma.Web.Plugs.IdempotencyPlug)
end
diff --git
a/lib/pleroma/web/static_fe/static_fe_controller.ex
b/lib/pleroma/web/static_fe/static_fe_controller.ex
index cc408ab5c376d04c4f1283d5a593aa2b7dddc3e7..687b17df6c18e67fa5441c031e6f4df71d1e0edf 100644
(file)
--- a/
lib/pleroma/web/static_fe/static_fe_controller.ex
+++ b/
lib/pleroma/web/static_fe/static_fe_controller.ex
@@
-17,7
+17,7
@@
defmodule Pleroma.Web.StaticFE.StaticFEController do
plug(:put_view, Pleroma.Web.StaticFE.StaticFEView)
plug(:assign_id)
plug(:put_view, Pleroma.Web.StaticFE.StaticFEView)
plug(:assign_id)
- plug(Pleroma.Plugs.EnsureAuthenticatedPlug,
+ plug(Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug,
unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
)
unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
)
diff --git
a/test/pleroma/web/plugs/ensure_authenticated_plug_test.exs
b/test/pleroma/web/plugs/ensure_authenticated_plug_test.exs
index b87f4e10307483c24895c6a30dd26de05234a74c..35095e01872c58c477ff1bf46f7f0ea43c343271 100644
(file)
--- a/
test/pleroma/web/plugs/ensure_authenticated_plug_test.exs
+++ b/
test/pleroma/web/plugs/ensure_authenticated_plug_test.exs
@@
-5,7
+5,7
@@
defmodule Pleroma.Web.Plugs.EnsureAuthenticatedPlugTest do
use Pleroma.Web.ConnCase, async: true
defmodule Pleroma.Web.Plugs.EnsureAuthenticatedPlugTest do
use Pleroma.Web.ConnCase, async: true
- alias Pleroma.Plugs.EnsureAuthenticatedPlug
+ alias Pleroma.
Web.
Plugs.EnsureAuthenticatedPlug
alias Pleroma.User
describe "without :if_func / :unless_func options" do
alias Pleroma.User
describe "without :if_func / :unless_func options" do