|> 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]))
"pleroma" => %{
"confirmation_pending" => false,
"tags" => []
- }
+ },
+ "rights" => %{"admin" => false, "delete_others_notice" => false},
+ "role" => "member"
}
assert represented == UserView.render("show.json", %{user: user})
"pleroma" => %{
"confirmation_pending" => false,
"tags" => []
- }
+ },
+ "rights" => %{"admin" => false, "delete_others_notice" => false},
+ "role" => "member"
}
assert represented == UserView.render("show.json", %{user: user, for: follower})
"pleroma" => %{
"confirmation_pending" => false,
"tags" => []
- }
+ },
+ "rights" => %{"admin" => false, "delete_others_notice" => false},
+ "role" => "member"
}
assert represented == UserView.render("show.json", %{user: follower, for: user})
"pleroma" => %{
"confirmation_pending" => false,
"tags" => []
- }
+ },
+ "rights" => %{"admin" => false, "delete_others_notice" => false},
+ "role" => "member"
}
blocker = User.get_cached_by_id(blocker.id)