diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-06 00:25:44 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-06 00:25:44 +0300 |
commit | af42c00cfffb2cd8e93857cd1cf2901113c45bd2 (patch) | |
tree | a98edf7a3b38b7fae020485100732ef3ba47542e /test/web/admin_api/admin_api_controller_test.exs | |
parent | 51111e286b316340b45b4e6a378646bed0cb0a6a (diff) | |
download | pleroma-af42c00cfffb2cd8e93857cd1cf2901113c45bd2.tar.gz pleroma-af42c00cfffb2cd8e93857cd1cf2901113c45bd2.zip |
[#1427] Reworked admin scopes support.
Requalified users.is_admin flag as legacy accessor to admin actions in case token lacks admin scope(s).
Diffstat (limited to 'test/web/admin_api/admin_api_controller_test.exs')
-rw-r--r-- | test/web/admin_api/admin_api_controller_test.exs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index 3a4c4d65c..fd179e8c2 100644 --- a/test/web/admin_api/admin_api_controller_test.exs +++ b/test/web/admin_api/admin_api_controller_test.exs @@ -1537,7 +1537,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do |> assign(:user, user) |> get("/api/pleroma/admin/reports") - assert json_response(conn, :forbidden) == %{"error" => "User is not admin."} + assert json_response(conn, :forbidden) == + %{"error" => "User is not an admin or OAuth admin scope is not granted."} end test "returns 403 when requested by anonymous" do |