From c9124f86613b2480977918cc089d8944cc0aa31d Mon Sep 17 00:00:00 2001 From: "makabe.t" Date: Tue, 7 Nov 2023 10:23:15 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20563:=20develop=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E7=A2=BA=E8=AA=8D=E4=B8=8D=E5=85=B7=E5=90=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task3042: develop動作確認不具合修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3042) - ライセンスページで代行操作中の挙動を修正しました。 - 自アカウント取得APIにガードを設定して実行可能に修正 - 代行操作中は第五階層ユーザーとして扱われるように修正 ## レビューポイント - 共有 ## UIの変更 - なし ## 動作確認状況 - ローカルで確認 --- dictation_client/src/pages/UserListPage/index.tsx | 5 +++-- .../src/features/accounts/accounts.controller.ts | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dictation_client/src/pages/UserListPage/index.tsx b/dictation_client/src/pages/UserListPage/index.tsx index c63c691..46f1223 100644 --- a/dictation_client/src/pages/UserListPage/index.tsx +++ b/dictation_client/src/pages/UserListPage/index.tsx @@ -87,8 +87,9 @@ const UserListPage: React.FC = (): JSX.Element => { const users = useSelector(selectUserViews); const isLoading = useSelector(selectIsLoading); - // ユーザーが第5階層であるかどうかを判定する - const isTier5 = isApproveTier([TIERS.TIER5]); + // ユーザーが第5階層であるかどうかを判定する(代行操作中は第5階層として扱う) + const isTier5 = + isApproveTier([TIERS.TIER5]) || delegationAccessToken !== null; return ( <> diff --git a/dictation_server/src/features/accounts/accounts.controller.ts b/dictation_server/src/features/accounts/accounts.controller.ts index ac29f0c..76c6e9c 100644 --- a/dictation_server/src/features/accounts/accounts.controller.ts +++ b/dictation_server/src/features/accounts/accounts.controller.ts @@ -199,7 +199,9 @@ export class AccountsController { }) @ApiBearerAuth() @UseGuards(AuthGuard) - @UseGuards(RoleGuard.requireds({ roles: [ADMIN_ROLES.ADMIN] })) + @UseGuards( + RoleGuard.requireds({ roles: [ADMIN_ROLES.ADMIN], delegation: true }), + ) @Get('me') async getMyAccount(@Req() req: Request): Promise { const accessToken = retrieveAuthorizationToken(req);