Apply suggestion to lib/pleroma/plugs/oauth_scopes_plug.ex

This commit is contained in:
Ivan Tashkinov 2019-09-18 10:31:10 +00:00
parent 847c7f02f5
commit e4f3d7f69d

View File

@ -61,9 +61,10 @@ def filter_descendants(scopes, supported_scopes) do
end
defp maybe_perform_instance_privacy_check(%Plug.Conn{} = conn, options) do
case options[:skip_instance_privacy_check] do
true -> conn
_ -> EnsurePublicOrAuthenticatedPlug.call(conn, [])
if options[:skip_instance_privacy_check] do
conn
else
EnsurePublicOrAuthenticatedPlug.call(conn, [])
end
end
end