From 61642539b147a4b053eed79669222cd5d30fb61b Mon Sep 17 00:00:00 2001 From: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> Date: Sat, 21 Sep 2019 21:35:22 +0900 Subject: [PATCH] =?UTF-8?q?Admin=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E4=B8=80=E8=A6=A7=E3=83=95?= =?UTF-8?q?=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=81=AB=E5=88=A9=E7=94=A8?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=20(#5430)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adminページのユーザー一覧フィルターにアクティブアカウントを追加 * validator update * availableに --- locales/ja-JP.yml | 1 + src/client/app/admin/views/users.vue | 1 + src/server/api/endpoints/admin/show-users.ts | 2 ++ 3 files changed, 4 insertions(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 141aefd5af..66200a7f54 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1547,6 +1547,7 @@ admin/views/users.vue: state: title: "状態" all: "すべて" + available: "利用可能" admin: "管理者" moderator: "モデレーター" adminOrModerator: "管理者+モデレーター" diff --git a/src/client/app/admin/views/users.vue b/src/client/app/admin/views/users.vue index 92b23749ff..920bfc381e 100644 --- a/src/client/app/admin/views/users.vue +++ b/src/client/app/admin/views/users.vue @@ -42,6 +42,7 @@ + diff --git a/src/server/api/endpoints/admin/show-users.ts b/src/server/api/endpoints/admin/show-users.ts index 89e0cf1e2a..a1fadf3d81 100644 --- a/src/server/api/endpoints/admin/show-users.ts +++ b/src/server/api/endpoints/admin/show-users.ts @@ -33,6 +33,7 @@ export const meta = { state: { validator: $.optional.str.or([ 'all', + 'available', 'admin', 'moderator', 'adminOrModerator', @@ -67,6 +68,7 @@ export default define(meta, async (ps, me) => { const query = Users.createQueryBuilder('user'); switch (ps.state) { + case 'available': query.where('user.isSuspended = FALSE'); break; case 'admin': query.where('user.isAdmin = TRUE'); break; case 'moderator': query.where('user.isModerator = TRUE'); break; case 'adminOrModerator': query.where('user.isAdmin = TRUE OR isModerator = TRUE'); break;