Use :restrict_unauthenticated testing for more granular control
This commit is contained in:
parent
549c895d80
commit
2011142ed9
|
@ -10,7 +10,7 @@ defmodule Pleroma.Web.Feed.TagController do
|
||||||
alias Pleroma.Web.Feed.FeedView
|
alias Pleroma.Web.Feed.FeedView
|
||||||
|
|
||||||
def feed(conn, params) do
|
def feed(conn, params) do
|
||||||
if Pleroma.Config.get!([:instance, :public]) do
|
unless Pleroma.Config.restrict_unauthenticated_access?(:activities, :local) do
|
||||||
render_feed(conn, params)
|
render_feed(conn, params)
|
||||||
else
|
else
|
||||||
render_error(conn, :not_found, "Not found")
|
render_error(conn, :not_found, "Not found")
|
||||||
|
|
|
@ -38,7 +38,7 @@ def feed_redirect(conn, %{"nickname" => nickname}) do
|
||||||
end
|
end
|
||||||
|
|
||||||
def feed(conn, params) do
|
def feed(conn, params) do
|
||||||
if Pleroma.Config.get!([:instance, :public]) do
|
unless Pleroma.Config.restrict_unauthenticated_access?(:profiles, :local) do
|
||||||
render_feed(conn, params)
|
render_feed(conn, params)
|
||||||
else
|
else
|
||||||
errors(conn, {:error, :not_found})
|
errors(conn, {:error, :not_found})
|
||||||
|
|
|
@ -46,7 +46,7 @@ def activity_nsfw?(_) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp activated_providers do
|
defp activated_providers do
|
||||||
if Pleroma.Config.get!([:instance, :public]) do
|
unless Pleroma.Config.restrict_unauthenticated_access?(:activities, :local) do
|
||||||
Pleroma.Config.get([__MODULE__, :providers], [])
|
Pleroma.Config.get([__MODULE__, :providers], [])
|
||||||
else
|
else
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Reference in New Issue