Fix rights in TwitterAPI's user entity being present only for
Admins/Moderators In !1093 I reused `maybe_with_role` for `rights` object, however I missed that `maybe_with_role` is called only for admins/moderators.
This commit is contained in:
parent
002ea343f8
commit
61ca2f7a4e
2 changed files with 13 additions and 10 deletions
|
|
@ -116,12 +116,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
|> maybe_with_activation_status(user, for_user)
|
||||
}
|
||||
|> maybe_with_user_settings(user, for_user)
|
||||
|
||||
data =
|
||||
if(user.info.is_admin || user.info.is_moderator,
|
||||
do: maybe_with_role(data, user, for_user),
|
||||
else: data
|
||||
)
|
||||
|> maybe_with_role(user, for_user)
|
||||
|
||||
if assigns[:token] do
|
||||
Map.put(data, "token", token_string(assigns[:token]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue