Admin API: fix GET /api/pleroma/admin/users/:nickname/credentials returning 404 when getting the credentials of a remote user while :instance, :limit_to_local_content is set to :unauthenticated
This commit is contained in:
parent
68036f5a3b
commit
c2be0da79f
3 changed files with 15 additions and 5 deletions
|
|
@ -1514,6 +1514,15 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
end
|
||||
end
|
||||
|
||||
test "gets a remote users when [:instance, :limit_to_local_content] is set to :unauthenticated",
|
||||
%{conn: conn} do
|
||||
clear_config(Pleroma.Config.get([:instance, :limit_to_local_content]), :unauthenticated)
|
||||
user = insert(:user, %{local: false, nickname: "u@peer1.com"})
|
||||
conn = get(conn, "/api/pleroma/admin/users/#{user.nickname}/credentials")
|
||||
|
||||
assert json_response(conn, 200)
|
||||
end
|
||||
|
||||
describe "GET /users/:nickname/credentials" do
|
||||
test "gets the user credentials", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue