Skip to content

Always provide pleroma.deactivated in masto_api account_view

Ilja requested to merge ilja/pleroma:mods_may_see_if_user_is_deactivated into develop

When a user is deactivated, "normal" users can't see them. Moderators and admins can.

There was logic that only added the "deactivated" key for admins, meaning that mods were able to see the account, but not that it was deactivated[1].

I didn't really see a reason to not just give that info always, so I removed that part of the logic. Now "normal" users will still not see the account (but the API returns a pleroma.deactivated: false key-value, which it didn't do before). Any one who can see the account will see if they are deactivated or not.

If there's a reason to not always have that key, two other approaches are

  1. Only show the key when deactivated
  2. Only show for User.superuser?

Note that deleted accounts are also just deactivated and can therefore be reactivated. They just get all their data deleted as well (posts, profile pic...), see #1735 (closed)

[1]
As admin I see the user is deactivated mix pleroma.user set ilja --admin --moderator
=> This is OK
image

As moderator it looks like the user is active mix pleroma.user set ilja --no-admin --moderator
=> This is confusing
image

As "normal" user I simply don't see the account mix pleroma.user set ilja --no-admin --no-moderator
=> This is OK
image

Edited by Ilja

Merge request reports