X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb.ex;h=24560d4a3da91cc4eab96b910e1329b4ede068b4;hb=798d13d6e95f4bbe3206a60c301d7819cfeefd54;hp=d26931af95f088fe0e87051bc464081de9613665;hpb=0ddf492c5d65559adceac3a78b0a648d09292c86;p=akkoma diff --git a/lib/pleroma/web.ex b/lib/pleroma/web.ex index d26931af9..24560d4a3 100644 --- a/lib/pleroma/web.ex +++ b/lib/pleroma/web.ex @@ -56,12 +56,23 @@ defmodule Pleroma.Web do plug_module.skip_plug(conn) rescue UndefinedFunctionError -> - raise "`#{plug_module}` is not skippable. Append `use Pleroma.Web, :plug` to its code." + reraise( + "`#{plug_module}` is not skippable. Append `use Pleroma.Web, :plug` to its code.", + __STACKTRACE__ + ) end end ) end + defp skip_auth(conn, _) do + skip_plug(conn, [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug]) + end + + defp skip_public_check(conn, _) do + skip_plug(conn, EnsurePublicOrAuthenticatedPlug) + end + # Executed just before actual controller action, invokes before-action hooks (callbacks) defp action(conn, params) do with %{halted: false} = conn <-