Merge branch 'admin-api-user-credentials-for-remote-users-fix' into 'develop'
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` Closes admin-fe#107 and #1788 See merge request pleroma/pleroma!2554
This commit is contained in:
commit
31a0ed5d01
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