Commit 4079ed3b authored by lain's avatar lain Committed by rinpatch

OAuthPlug, Router: Handle deactivated users in the UserEnabledPlug

parent 5b5f8552
......@@ -71,7 +71,7 @@ defp fetch_user_and_token(token) do
)
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
with %Token{user: %{info: %{deactivated: false} = _} = user} = token_record <- Repo.one(query) do
with %Token{user: user} = token_record <- Repo.one(query) do
{:ok, user, token_record}
end
end
......
......@@ -13,6 +13,7 @@ defmodule Pleroma.Web.Router do
pipeline :oauth do
plug(:fetch_session)
plug(Pleroma.Plugs.OAuthPlug)
plug(Pleroma.Plugs.UserEnabledPlug)
end
pipeline :api do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment