Always provide pleroma.deactivated in masto_api account_view
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
- Only show the key when deactivated
- 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
As moderator it looks like the user is active mix pleroma.user set ilja --no-admin --moderator
=> This is confusing
As "normal" user I simply don't see the account mix pleroma.user set ilja --no-admin --no-moderator
=> This is OK