User.visible_for/2

According to the tests, this was only used for unconfirmed accounts.
So this just needed to be restricted to users with privilege :user_activation
This commit is contained in:
Ilja 2022-06-18 08:32:05 +02:00
commit edf0013ff3
2 changed files with 7 additions and 2 deletions

View file

@ -326,7 +326,7 @@ defmodule Pleroma.User do
end
def visible_for(%User{} = user, for_user) do
if superuser?(for_user) do
if privileged?(for_user, :user_activation) do
:visible
else
visible_account_status(user)