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);