From 1d6b1d052dc609c58135266f357dd887a96075a2 Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 1 Mar 2024 07:47:40 +0900 Subject: [PATCH] feat: allow admins to migrate accounts --- docs/changelog.md | 2 ++ packages/backend/src/server/api/endpoints/i/move.ts | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index aef4f9eef7..bb05e60c46 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -5,6 +5,8 @@ Critical security updates are indicated by the :warning: icon. ## Unreleased - Add ability to hide replies from certain users in timelines +- Admins are now allowed to migrate their account + - This was requested by personal server admins ## v20240229 diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts index 6bd76a621d..53379c76c3 100644 --- a/packages/backend/src/server/api/endpoints/i/move.ts +++ b/packages/backend/src/server/api/endpoints/i/move.ts @@ -43,11 +43,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", @@ -93,7 +88,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);