diff options
author | lain <lain@soykaf.club> | 2020-04-29 11:09:30 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-29 11:09:30 +0000 |
commit | 58fded9858edbeb318dc011cb313e82a86fbafcb (patch) | |
tree | 90539822a02e9ff1de91969ad179da907c031b4d /lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex | |
parent | 699fc9569fa06278baaec6804348375cb9891185 (diff) | |
parent | 4c0e53367acd74de04de070a5e33380f5e457163 (diff) | |
download | pleroma-58fded9858edbeb318dc011cb313e82a86fbafcb.tar.gz |
Merge branch 'automatic-authentication-and-instance-publicity-checks' into 'develop'
Automatic checks of authentication / authorization / instance publicity
See merge request pleroma/pleroma!2409
Diffstat (limited to 'lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex')
-rw-r--r-- | lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex b/lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex index 4463ec477..22da6c0ad 100644 --- a/lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex +++ b/lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex @@ -13,10 +13,12 @@ defmodule Pleroma.Web.PleromaAPI.ScrobbleController do alias Pleroma.Web.CommonAPI alias Pleroma.Web.MastodonAPI.StatusView - plug(OAuthScopesPlug, %{scopes: ["read"]} when action == :user_scrobbles) - plug(OAuthScopesPlug, %{scopes: ["write"]} when action != :user_scrobbles) + plug( + OAuthScopesPlug, + %{scopes: ["read"], fallback: :proceed_unauthenticated} when action == :user_scrobbles + ) - plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug) + plug(OAuthScopesPlug, %{scopes: ["write"]} when action != :user_scrobbles) def new_scrobble(%{assigns: %{user: user}} = conn, %{"title" => _} = params) do params = |