We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
で設定された値より1つリストやユーザを多く登録できる。
登録上限を超えて登録しようとしたらエラーが出てほしい。
上限+1個目の登録でも通常通り処理されて 51/50ユーザー のような表示になる。
51/50ユーザー
ユーザリストの作成可能数
ユーザリスト内のユーザの最大数
ローカル環境を構築して試したところ以下の修正で想定通りの動作になりました。
diff --git a/packages/backend/src/core/UserListService.ts b/packages/backend/src/core/UserListService.ts index 702c731fc..64b7f65bb 100644 --- a/packages/backend/src/core/UserListService.ts +++ b/packages/backend/src/core/UserListService.ts @@ -88,7 +88,7 @@ export class UserListService implements OnApplicationShutdown { const currentCount = await this.userListMembershipsRepository.countBy({ userListId: list.id, }); - if (currentCount > (await this.roleService.getUserPolicies(me.id)).userEachUserListsLimit) { + if (currentCount >= (await this.roleService.getUserPolicies(me.id)).userEachUserListsLimit) { throw new UserListService.TooManyUsersError(); } diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts index e86e4c0de..09c95c5a9 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -61,7 +61,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- const currentCount = await this.userListsRepository.countBy({ userId: me.id, }); - if (currentCount > (await this.roleService.getUserPolicies(me.id)).userListLimit) { + if (currentCount >= (await this.roleService.getUserPolicies(me.id)).userListLimit) { throw new ApiError(meta.errors.tooManyUserLists); }
* Model and OS of the device(s): Windows 10 Pro 22H2 19045.3570 * Browser: Firefox 119.0 (64 ビット) * Server URL: localhost * Misskey: 2023.11.0
* Installation Method or Hosting Service: docker compose * Misskey: 2023.11.0 * Node: v20.5.1 * PostgreSQL: 15.4 * Redis: 7.2.3 * OS and Architecture: Ubuntu 20.04.6 LTS x86_64
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
💡 Summary
で設定された値より1つリストやユーザを多く登録できる。
🥰 Expected Behavior
登録上限を超えて登録しようとしたらエラーが出てほしい。
🤬 Actual Behavior
上限+1個目の登録でも通常通り処理されて
51/50ユーザー
のような表示になる。📝 Steps to Reproduce
ユーザリストの作成可能数
ユーザリスト内のユーザの最大数
ローカル環境を構築して試したところ以下の修正で想定通りの動作になりました。
💻 Frontend Environment
🛰 Backend Environment (for server admin)
The text was updated successfully, but these errors were encountered: