diff --git a/locales/index.d.ts b/locales/index.d.ts index 638ac10e7..eed29f408 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1431,8 +1431,6 @@ export interface Locale { "isConditionalRole": string; "isPublic": string; "descriptionOfIsPublic": string; - "isPublicUsers": string; - "descriptionOfIsPublicUsers": string; "options": string; "policies": string; "baseRole": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 5a7a2afd5..8004e5357 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1352,10 +1352,8 @@ _role: conditional: "コンディショナル" condition: "条件" isConditionalRole: "これはコンディショナルロールです。" - isPublic: "ロールを公開" + isPublic: "公開ロール" descriptionOfIsPublic: "ユーザーのプロフィールでこのロールが表示されます。" - isPublicUsers: "ユーザーリストを公開" - descriptionOfIsPublicUsers: "ロールにアサインされたユーザーのリストを誰でも見ることができます。" options: "オプション" policies: "ポリシー" baseRole: "ベースロール" @@ -1364,8 +1362,8 @@ _role: iconUrl: "アイコン画像のURL" asBadge: "バッジとして表示" descriptionOfAsBadge: "オンにすると、ユーザー名の横にロールのアイコンが表示されます。" - isExplorable: "ロールタイムラインを公開" - descriptionOfIsExplorable: "オンにすると、ロールのタイムラインを公開します。ロールの公開がオフの場合、タイムラインの公開はされません。" + isExplorable: "ユーザーを見つけやすくする" + descriptionOfIsExplorable: "オンにすると、「みつける」でメンバー一覧が公開されるほか、ロールのタイムラインが利用可能になります。" displayOrder: "表示順" descriptionOfDisplayOrder: "数値が大きいほどUI上で先頭に表示されます。" canEditMembersByModerator: "モデレーターのメンバー編集を許可" diff --git a/packages/backend/migration/1686381571997-roleuserhidden.js b/packages/backend/migration/1686381571997-roleuserhidden.js deleted file mode 100644 index 5cfa9ab87..000000000 --- a/packages/backend/migration/1686381571997-roleuserhidden.js +++ /dev/null @@ -1,11 +0,0 @@ -export class roleuserhidden1686381571997 { - name = 'roleuserhidden1686381571997' - - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "role" ADD "isPublicUsers" boolean NOT NULL DEFAULT true`); - } - - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "role" DROP COLUMN "isPublicUsers"`); - } -} diff --git a/packages/backend/src/models/entities/Role.ts b/packages/backend/src/models/entities/Role.ts index 067f7bf62..61f40d59d 100644 --- a/packages/backend/src/models/entities/Role.ts +++ b/packages/backend/src/models/entities/Role.ts @@ -167,11 +167,6 @@ export class Role { }) public displayOrder: number; - @Column('boolean', { - default: true, - }) - public isPublicUsers: boolean; - @Column('jsonb', { default: { }, }) diff --git a/packages/backend/src/server/api/endpoints/admin/roles/create.ts b/packages/backend/src/server/api/endpoints/admin/roles/create.ts index 1cf3157ac..916172f54 100644 --- a/packages/backend/src/server/api/endpoints/admin/roles/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/roles/create.ts @@ -26,7 +26,6 @@ export const paramDef = { isModerator: { type: 'boolean' }, isAdministrator: { type: 'boolean' }, isExplorable: { type: 'boolean', default: false }, // optional for backward compatibility - isPublicUsers: { type: 'boolean', default: true }, // optional for backward compatibility asBadge: { type: 'boolean' }, canEditMembersByModerator: { type: 'boolean' }, displayOrder: { type: 'number' }, @@ -79,7 +78,6 @@ export default class extends Endpoint { isAdministrator: ps.isAdministrator, isModerator: ps.isModerator, isExplorable: ps.isExplorable, - isPublicUsers: ps.isPublicUsers, asBadge: ps.asBadge, canEditMembersByModerator: ps.canEditMembersByModerator, displayOrder: ps.displayOrder, diff --git a/packages/backend/src/server/api/endpoints/admin/roles/update.ts b/packages/backend/src/server/api/endpoints/admin/roles/update.ts index 5108c4da1..467f157a6 100644 --- a/packages/backend/src/server/api/endpoints/admin/roles/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/roles/update.ts @@ -34,7 +34,6 @@ export const paramDef = { isModerator: { type: 'boolean' }, isAdministrator: { type: 'boolean' }, isExplorable: { type: 'boolean' }, - isPublicUsers: { type: 'boolean' }, asBadge: { type: 'boolean' }, canEditMembersByModerator: { type: 'boolean' }, displayOrder: { type: 'number' }, @@ -88,7 +87,6 @@ export default class extends Endpoint { isModerator: ps.isModerator, isAdministrator: ps.isAdministrator, isExplorable: ps.isExplorable, - isPublicUsers: ps.isPublicUsers, asBadge: ps.asBadge, canEditMembersByModerator: ps.canEditMembersByModerator, displayOrder: ps.displayOrder, diff --git a/packages/backend/src/server/api/endpoints/roles/list.ts b/packages/backend/src/server/api/endpoints/roles/list.ts index d61c6b8dc..5ad29839c 100644 --- a/packages/backend/src/server/api/endpoints/roles/list.ts +++ b/packages/backend/src/server/api/endpoints/roles/list.ts @@ -30,6 +30,7 @@ export default class extends Endpoint { super(meta, paramDef, async (ps, me) => { const roles = await this.rolesRepository.findBy({ isPublic: true, + isExplorable: true, }); return await this.roleEntityService.packMany(roles, me); }); diff --git a/packages/backend/src/server/api/endpoints/roles/users.ts b/packages/backend/src/server/api/endpoints/roles/users.ts index f4b30286a..b2cb8b42a 100644 --- a/packages/backend/src/server/api/endpoints/roles/users.ts +++ b/packages/backend/src/server/api/endpoints/roles/users.ts @@ -49,14 +49,12 @@ export default class extends Endpoint { const role = await this.rolesRepository.findOneBy({ id: ps.roleId, isPublic: true, + isExplorable: true, }); if (role == null) { throw new ApiError(meta.errors.noSuchRole); } - if (!role.isPublicUsers) { - return []; - } const query = this.queryService.makePaginationQuery(this.roleAssignmentsRepository.createQueryBuilder('assign'), ps.sinceId, ps.untilId) .andWhere('assign.roleId = :roleId', { roleId: role.id }) diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index 6aeef6cb1..a1fa9d293 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -63,11 +63,6 @@ - - - - -
@@ -506,7 +501,6 @@ const save = throttle(100, () => { isModerator: role.isModerator, isPublic: role.isPublic, isExplorable: role.isExplorable, - isPublicUsers: role.isPublicUsers, asBadge: role.asBadge, canEditMembersByModerator: role.canEditMembersByModerator, policies: role.policies,