Merge branch 'features/admin-api-user-views' into 'develop'

User/Account views: Add rights.admin

Closes #472

See merge request pleroma/pleroma!589
This commit is contained in:
kaniini 2018-12-31 15:49:34 +00:00
commit 90e157ef80
3 changed files with 19 additions and 6 deletions

View file

@ -96,7 +96,8 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
"profile_image_url_profile_size" => image,
"profile_image_url_original" => image,
"rights" => %{
"delete_others_notice" => !!user.info.is_moderator
"delete_others_notice" => !!user.info.is_moderator,
"admin" => !!user.info.is_admin
},
"screen_name" => user.nickname,
"statuses_count" => user_info[:note_count],