forked from nekoplanet/misskey
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick commits from: nekoplanet#20 - nekoplanet@736c808 - nekoplanet@dbd3028 - nekoplanet@effcdaa - nekoplanet@c5cd665 - nekoplanet@db463c9 Fix: signup-approve (serafuku patch) - state enum의 approved 를 pending 으로 변경 - metaEntityService 에서 approvalRequiredForSignup 넣어주도록 수정 - SignupRequest type에 reason 추가 - 모더레이션 페이지에서 승인 설정 바꾸면 update-meta 하도록 수정 - 기타 어쩌구 저쩌구 프론트&백앤드 버그수정 - Fix lint - fix E2E - 한글 번역 추가 (yozumina) - Fix: user Approved index 추가 - 가입화면 & 가입승인관리 UI 조정 - Fix: 가입 오픈 상태에서는 approved를 자동으로 true Co-authored-by: HotoRas <[email protected]> Co-authored-by: Squarecat-meow <[email protected]>
- Loading branch information
1 parent
58580d7
commit 7bf8775
Showing
50 changed files
with
805 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/backend/migration/1697580470000-approvalSignup.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and other misskey contributors | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export class ApprovalSignup1697580470000 { | ||
name = 'ApprovalSignup1697580470000' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "meta" ADD "approvalRequiredForSignup" boolean DEFAULT false NOT NULL`); | ||
await queryRunner.query(`ALTER TABLE "user" ADD "approved" boolean DEFAULT false NOT NULL`); | ||
//▼ 既存のユーザーについては全員Approveにする | ||
await queryRunner.query(`UPDATE "user" SET "approved" = true`); | ||
await queryRunner.query(`ALTER TABLE "user" ADD "signupReason" character varying(1000) NULL`); | ||
await queryRunner.query(`ALTER TABLE "user_pending" ADD "reason" character varying(1000) NULL`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "approvalRequiredForSignup"`); | ||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "approved"`); | ||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "signupReason"`); | ||
await queryRunner.query(`ALTER TABLE "user_pending" DROP COLUMN "reason"`); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/backend/migration/1729528715258-Index_user_Approved.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and misskey-project | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export class IndexUserApproved1729528715258 { | ||
name = 'IndexUserApproved1729528715258'; | ||
async up(queryRunner) { | ||
await queryRunner.query(` | ||
CREATE INDEX "IDX_USER_APPROVED" ON "user" ("approved") | ||
`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(` | ||
DROP INDEX "public"."IDX_USER_APPROVED" | ||
`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.