Add "local" to users admin API

This commit is contained in:
Maxim Filippov 2019-03-13 16:04:44 +03:00
parent 92a0210fb0
commit 490d9cf7b1
2 changed files with 15 additions and 7 deletions

View file

@ -21,6 +21,7 @@ defmodule Pleroma.Web.MastodonAPI.Admin.AccountView do
"id" => user.id,
"nickname" => user.nickname,
"deactivated" => user.info.deactivated,
"local" => user.local,
"roles" => Info.roles(user.info)
}
end

View file

@ -394,7 +394,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest 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