diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-01-27 09:45:51 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-01-27 09:45:51 +0000 |
commit | b58e4ddb10a1144a0afbac259cbe8bfcfd363ba6 (patch) | |
tree | bcbe4dfbece92e0db7b3fb82ac020dda0a9fa245 | |
parent | 717579330427ed4f78ee578d008818c07106318f (diff) | |
parent | a65c18859307f4aacf42eb5dd14e63ad76747a6d (diff) | |
download | pleroma-b58e4ddb10a1144a0afbac259cbe8bfcfd363ba6.tar.gz |
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
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/account_view.ex | 4 | ||||
-rw-r--r-- | test/web/mastodon_api/account_view_test.exs | 8 |
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 index bfd6b8b22..0ba4289da 100644 --- 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 index d53e11963..f8cd68173 100644 --- 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 } } |