From a0bbaa7fb723553b1d7ed6579eb06ebc3452f960 Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 17 Oct 2023 04:54:31 +0900 Subject: [PATCH] feat: allow admins to migrate accounts --- README.md | 1 + packages/backend/src/server/api/endpoints/i/move.ts | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 5e54f82d..f7c21a78 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ ## 細かい変更点 +- 管理者アカウントも引っ越しできるように - まだマージされていない本家 Firefish へのマージリクエストを独断で取り込み - アイコンフォントのスタイルを設定から選べるように ([MR](https://git.joinfirefish.org/firefish/firefish/-/merge_requests/10613)) - デフォルトのアイコンの太さも細めに変更 diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts index d972aaf1..088c2ff3 100644 --- a/packages/backend/src/server/api/endpoints/i/move.ts +++ b/packages/backend/src/server/api/endpoints/i/move.ts @@ -42,11 +42,6 @@ export const meta = { code: "NOT_REMOTE", id: "4362f8dc-731f-4ad8-a694-be2a88922a24", }, - adminForbidden: { - message: "Admins cant migrate.", - code: "NOT_ADMIN_FORBIDDEN", - id: "4362e8dc-731f-4ad8-a694-be2a88922a24", - }, noSuchUser: { message: "No such user.", code: "NO_SUCH_USER", @@ -92,7 +87,6 @@ function moveActivity(toUrl: string, fromUrl: string) { export default define(meta, paramDef, async (ps, user) => { if (!ps.moveToAccount) throw new ApiError(meta.errors.noSuchMoveTarget); - if (user.isAdmin) throw new ApiError(meta.errors.adminForbidden); if (user.movedToUri) throw new ApiError(meta.errors.alreadyMoved); const { username, host } = parse(ps.moveToAccount);