logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: b58e4ddb10a1144a0afbac259cbe8bfcfd363ba6
parent: 717579330427ed4f78ee578d008818c07106318f
Author: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Date:   Sun, 27 Jan 2019 09:45:51 +0000

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

Diffstat:

Mlib/pleroma/web/mastodon_api/views/account_view.ex4+++-
Mtest/web/mastodon_api/account_view_test.exs8++++++--
2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -112,7 +112,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do # Pleroma extension pleroma: %{ 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 diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs @@ -61,7 +61,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do }, pleroma: %{ confirmation_pending: false, - tags: [] + tags: [], + is_admin: false, + is_moderator: false } } @@ -102,7 +104,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do }, pleroma: %{ confirmation_pending: false, - tags: [] + tags: [], + is_admin: false, + is_moderator: false } }