1
0
Fork 0
forked from mirrors/akkoma

Merge branch 'features/masto-account-view-rights' into 'develop'

Web.MastodonAPI.AccountView: Add is_moderator and is_admin

Closes #557

See merge request pleroma/pleroma!718
This commit is contained in:
Haelwenn 2019-01-27 09:45:51 +00:00
commit b58e4ddb10
2 changed files with 9 additions and 3 deletions

View file

@ -112,7 +112,9 @@ defp do_render("account.json", %{user: user} = opts) do
# Pleroma extension # Pleroma extension
pleroma: %{ pleroma: %{
confirmation_pending: user_info.confirmation_pending, confirmation_pending: user_info.confirmation_pending,
tags: user.tags tags: user.tags,
is_moderator: user.info.is_moderator,
is_admin: user.info.is_admin
} }
} }
end end

View file

@ -61,7 +61,9 @@ test "Represent a user account" do
}, },
pleroma: %{ pleroma: %{
confirmation_pending: false, confirmation_pending: false,
tags: [] tags: [],
is_admin: false,
is_moderator: false
} }
} }
@ -102,7 +104,9 @@ test "Represent a Service(bot) account" do
}, },
pleroma: %{ pleroma: %{
confirmation_pending: false, confirmation_pending: false,
tags: [] tags: [],
is_admin: false,
is_moderator: false
} }
} }