OAuthPlug, Router: Handle deactivated users in the UserEnabledPlug
This commit is contained in:
parent
f6056e9c9c
commit
f17e0f8e4f
@ -71,7 +71,7 @@ defmodule Pleroma.Plugs.OAuthPlug do
|
||||
)
|
||||
|
||||
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
|
||||
with %Token{user: %{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
|
||||
|
Loading…
Reference in New Issue
Block a user