Commit 490d9cf7 authored by Maxim Filippov's avatar Maxim Filippov 🌚

Add "local" to users admin API

parent 92a0210f
......@@ -21,6 +21,7 @@ def render("show.json", %{user: user}) do
"id" => user.id,
"nickname" => user.nickname,
"deactivated" => user.info.deactivated,
"local" => user.local,
"roles" => Info.roles(user.info)
}
end
......
......@@ -394,7 +394,8 @@ test "regular search" do
"deactivated" => user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false}
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
}
]
}
......@@ -418,7 +419,8 @@ test "regular search with page size" do
"deactivated" => user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false}
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
}
]
}
......@@ -436,7 +438,8 @@ test "regular search with page size" do
"deactivated" => user2.info.deactivated,
"id" => user2.id,
"nickname" => user2.nickname,
"roles" => %{"admin" => false, "moderator" => false}
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
}
]
}
......@@ -461,7 +464,8 @@ test "only local users" do
"deactivated" => user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false}
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
}
]
}
......@@ -486,13 +490,15 @@ test "only local users with no query" do
"deactivated" => admin.info.deactivated,
"id" => admin.id,
"nickname" => admin.nickname,
"roles" => %{"admin" => true, "moderator" => false}
"roles" => %{"admin" => true, "moderator" => false},
"local" => true
},
%{
"deactivated" => user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false}
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
}
]
}
......@@ -513,7 +519,8 @@ test "PATCH /api/pleroma/admin/users/:nickname/toggle_activation" do
"deactivated" => !user.info.deactivated,
"id" => user.id,
"nickname" => user.nickname,
"roles" => %{"admin" => false, "moderator" => false}
"roles" => %{"admin" => false, "moderator" => false},
"local" => true
}
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment