diff --git a/dictation_client/codegen.sh b/dictation_client/codegen.sh
index 5d09ae3..d165c0c 100644
--- a/dictation_client/codegen.sh
+++ b/dictation_client/codegen.sh
@@ -1,2 +1,2 @@
-npx openapi-generator-cli version-manager set latest
+npx openapi-generator-cli version-manager set 7.1.0
npx openapi-generator-cli generate -g typescript-axios -i /app/dictation_server/src/api/odms/openapi.json -o /app/dictation_client/src/api/
diff --git a/dictation_client/src/api/api.ts b/dictation_client/src/api/api.ts
index 1c1ac87..645f058 100644
--- a/dictation_client/src/api/api.ts
+++ b/dictation_client/src/api/api.ts
@@ -1549,12 +1549,6 @@ export interface PostUpdateUserRequest {
* @memberof PostUpdateUserRequest
*/
'autoRenew': boolean;
- /**
- *
- * @type {boolean}
- * @memberof PostUpdateUserRequest
- */
- 'licenseAlart': boolean;
/**
*
* @type {boolean}
@@ -1660,12 +1654,6 @@ export interface SignupRequest {
* @memberof SignupRequest
*/
'autoRenew': boolean;
- /**
- *
- * @type {boolean}
- * @memberof SignupRequest
- */
- 'licenseAlert': boolean;
/**
*
* @type {boolean}
@@ -2212,12 +2200,6 @@ export interface User {
* @memberof User
*/
'autoRenew': boolean;
- /**
- *
- * @type {boolean}
- * @memberof User
- */
- 'licenseAlert': boolean;
/**
*
* @type {boolean}
diff --git a/dictation_client/src/features/user/operations.ts b/dictation_client/src/features/user/operations.ts
index f02e38c..b7ca2b0 100644
--- a/dictation_client/src/features/user/operations.ts
+++ b/dictation_client/src/features/user/operations.ts
@@ -164,7 +164,6 @@ export const updateUserAsync = createAsyncThunk<
encryptionPassword,
prompt,
autoRenew: updateUser.autoRenew,
- licenseAlart: updateUser.licenseAlert,
notification: updateUser.notification,
},
{
diff --git a/dictation_client/src/features/user/selectors.ts b/dictation_client/src/features/user/selectors.ts
index e1e3cf1..ee1f3fa 100644
--- a/dictation_client/src/features/user/selectors.ts
+++ b/dictation_client/src/features/user/selectors.ts
@@ -131,8 +131,6 @@ export const selectAuthorId = (state: RootState) =>
state.user.apps.addUser.authorId;
export const selectAutoRenew = (state: RootState) =>
state.user.apps.addUser.autoRenew;
-export const selectLicenseAlert = (state: RootState) =>
- state.user.apps.addUser.licenseAlert;
export const selectNotification = (state: RootState) =>
state.user.apps.addUser.notification;
// AddUserを返却する
diff --git a/dictation_client/src/features/user/types.ts b/dictation_client/src/features/user/types.ts
index 7f41187..649b63f 100644
--- a/dictation_client/src/features/user/types.ts
+++ b/dictation_client/src/features/user/types.ts
@@ -16,7 +16,6 @@ export interface UserView
encryption: boolean | string;
emailVerified: boolean;
autoRenew: boolean;
- licenseAlert: boolean;
notification: boolean;
name: string;
email: string;
@@ -28,7 +27,6 @@ export interface AddUser {
role: RoleType;
email: string;
autoRenew: boolean;
- licenseAlert: boolean;
notification: boolean;
authorId?: string;
encryption?: boolean;
@@ -46,7 +44,6 @@ export interface UpdateUser {
encryptionPassword?: string | undefined;
prompt?: boolean | undefined;
autoRenew: boolean;
- licenseAlert: boolean;
notification: boolean;
}
diff --git a/dictation_client/src/features/user/userSlice.ts b/dictation_client/src/features/user/userSlice.ts
index 52ffbc4..ef0589a 100644
--- a/dictation_client/src/features/user/userSlice.ts
+++ b/dictation_client/src/features/user/userSlice.ts
@@ -23,7 +23,6 @@ const initialState: UsersState = {
encryptionPassword: undefined,
prompt: undefined,
autoRenew: true,
- licenseAlert: true,
notification: true,
},
selectedUser: {
@@ -36,7 +35,6 @@ const initialState: UsersState = {
encryptionPassword: undefined,
prompt: undefined,
autoRenew: true,
- licenseAlert: true,
notification: true,
},
addUser: {
@@ -44,7 +42,6 @@ const initialState: UsersState = {
role: USER_ROLES.NONE,
email: "",
autoRenew: true,
- licenseAlert: true,
notification: true,
authorId: undefined,
encryption: false,
@@ -93,13 +90,6 @@ export const userSlice = createSlice({
const { autoRenew } = action.payload;
state.apps.addUser.autoRenew = autoRenew;
},
- changeLicenseAlert: (
- state,
- action: PayloadAction<{ licenseAlert: boolean }>
- ) => {
- const { licenseAlert } = action.payload;
- state.apps.addUser.licenseAlert = licenseAlert;
- },
changeEncryption: (
state,
action: PayloadAction<{ encryption: boolean }>
@@ -149,7 +139,6 @@ export const userSlice = createSlice({
state.apps.updateUser.encryptionPassword = undefined;
state.apps.updateUser.prompt = user.prompt;
state.apps.updateUser.autoRenew = user.autoRenew;
- state.apps.updateUser.licenseAlert = user.licenseAlert;
state.apps.updateUser.notification = user.notification;
state.apps.selectedUser.id = user.id;
@@ -161,7 +150,6 @@ export const userSlice = createSlice({
state.apps.selectedUser.encryptionPassword = undefined;
state.apps.selectedUser.prompt = user.prompt;
state.apps.selectedUser.autoRenew = user.autoRenew;
- state.apps.selectedUser.licenseAlert = user.licenseAlert;
state.apps.selectedUser.notification = user.notification;
state.apps.hasPasswordMask = user.encryption;
@@ -211,13 +199,6 @@ export const userSlice = createSlice({
const { autoRenew } = action.payload;
state.apps.updateUser.autoRenew = autoRenew;
},
- changeUpdateLicenseAlert: (
- state,
- action: PayloadAction<{ licenseAlert: boolean }>
- ) => {
- const { licenseAlert } = action.payload;
- state.apps.updateUser.licenseAlert = licenseAlert;
- },
changeUpdateNotification: (
state,
action: PayloadAction<{ notification: boolean }>
@@ -318,7 +299,6 @@ export const {
changeRole,
changeAuthorId,
changeAutoRenew,
- changeLicenseAlert,
changeNotification,
cleanupAddUser,
changeUpdateUser,
@@ -328,7 +308,6 @@ export const {
changeUpdateEncryptionPassword,
changeUpdatePrompt,
changeUpdateAutoRenew,
- changeUpdateLicenseAlert,
changeUpdateNotification,
cleanupUpdateUser,
changeEncryption,
diff --git a/dictation_client/src/pages/AuthPage/index.tsx b/dictation_client/src/pages/AuthPage/index.tsx
index a1559bd..a17880d 100644
--- a/dictation_client/src/pages/AuthPage/index.tsx
+++ b/dictation_client/src/pages/AuthPage/index.tsx
@@ -10,6 +10,14 @@ import {
import React, { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
+import {
+ clearToken,
+ isAdminUser,
+ isApproveTier,
+ isStandardUser,
+ loadAccessToken,
+} from "features/auth";
+import { TIERS } from "components/auth/constants";
const AuthPage: React.FC = (): JSX.Element => {
const { instance } = useMsal();
@@ -26,6 +34,39 @@ const AuthPage: React.FC = (): JSX.Element => {
(async () => {
try {
+ // ログイン済みの場合、ログイン後の遷移先を決定する
+ if (loadAccessToken()) {
+ // 第一~第四階層の管理者はライセンス画面へ遷移
+ if (
+ isApproveTier([
+ TIERS.TIER1,
+ TIERS.TIER2,
+ TIERS.TIER3,
+ TIERS.TIER4,
+ ]) &&
+ isAdminUser()
+ ) {
+ navigate("/license");
+ return;
+ }
+ // 第五階層の管理者はユーザー画面へ遷移
+ if (isApproveTier([TIERS.TIER5]) && isAdminUser()) {
+ navigate("/user");
+ return;
+ }
+ // 一般ユーザーはdictationPageへ遷移
+ if (isStandardUser()) {
+ navigate("/dictations");
+ return;
+ }
+ // それ以外は認証エラー画面へ遷移
+ instance.logoutRedirect({
+ postLogoutRedirectUri: "/AuthError",
+ });
+ clearToken();
+ return;
+ }
+
const loginResult = await instance.handleRedirectPromise();
// eslint-disable-next-line
diff --git a/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx b/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx
index 0bcd5ba..1a4104c 100644
--- a/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx
+++ b/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx
@@ -122,7 +122,7 @@ export const FilePropertyPopup: React.FC = (props) => {
{t(getTranslationID("dictationPage.label.transcriptionist"))}
{selectedFileTask?.typist?.name ?? ""}
- {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
+ {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
{t(getTranslationID("filePropertyPopup.label.close"))}
diff --git a/dictation_client/src/pages/LoginPage/index.tsx b/dictation_client/src/pages/LoginPage/index.tsx
index e298c40..c335bd3 100644
--- a/dictation_client/src/pages/LoginPage/index.tsx
+++ b/dictation_client/src/pages/LoginPage/index.tsx
@@ -28,6 +28,33 @@ const LoginPage: React.FC = (): JSX.Element => {
selectLocalStorageKeyforIdToken
);
+ // ログイン後の遷移先を決定する
+ const navigateToLoginedPage = useCallback(() => {
+ // 第一~第四階層の管理者はライセンス画面へ遷移
+ if (
+ isApproveTier([TIERS.TIER1, TIERS.TIER2, TIERS.TIER3, TIERS.TIER4]) &&
+ isAdminUser()
+ ) {
+ navigate("/license");
+ return;
+ }
+ // 第五階層の管理者はユーザー画面へ遷移
+ if (isApproveTier([TIERS.TIER5]) && isAdminUser()) {
+ navigate("/user");
+ return;
+ }
+ // 一般ユーザーはdictationPageへ遷移
+ if (isStandardUser()) {
+ navigate("/dictations");
+ return;
+ }
+ // それ以外は認証エラー画面へ遷移
+ instance.logoutRedirect({
+ postLogoutRedirectUri: "/AuthError",
+ });
+ clearToken();
+ }, [instance, navigate]);
+
const tokenSet = useCallback(
async (idToken: string) => {
// ログイン処理呼び出し
@@ -59,44 +86,36 @@ const LoginPage: React.FC = (): JSX.Element => {
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
- // 第一~第四階層の管理者はライセンス画面へ遷移
- if (
- isApproveTier([TIERS.TIER1, TIERS.TIER2, TIERS.TIER3, TIERS.TIER4]) &&
- isAdminUser()
- ) {
- navigate("/license");
- return;
- }
- // 第五階層の管理者はユーザー画面へ遷移
- if (isApproveTier([TIERS.TIER5]) && isAdminUser()) {
- navigate("/user");
- return;
- }
- // 一般ユーザーはdictationPageへ遷移
- if (isStandardUser()) {
- navigate("/dictations");
- return;
- }
- // それ以外は認証エラー画面へ遷移
- instance.logoutRedirect({
- postLogoutRedirectUri: "/AuthError",
- });
- clearToken();
+
+ // ログイン成功した場合、適切なページに遷移する
+ navigateToLoginedPage();
}
},
- [dispatch, i18n.language, instance, navigate]
+ [dispatch, i18n.language, instance, navigate, navigateToLoginedPage]
);
useEffect(() => {
- // AADB2Cのログイン画面とLoginPageを経由していない場合はトップページに遷移する
- if (!localStorageKeyforIdToken) {
- navigate("/");
- return;
- }
-
+ // idTokenStringがあるか⇒認証中
+ // accessTokenがある場合⇒ログイン済み
+ // どちらもなければ直打ち
(async () => {
- // IDトークンの取得
+ if (loadAccessToken()) {
+ navigateToLoginedPage();
+ return;
+ }
+
+ // AADB2Cのログイン画面とLoginPageを経由していない場合はトップページに遷移する
+ if (!localStorageKeyforIdToken) {
+ navigate("/");
+ return;
+ }
const idTokenString = localStorage.getItem(localStorageKeyforIdToken);
+
+ if (idTokenString === null) {
+ navigate("/");
+ return;
+ }
+
if (idTokenString) {
const idTokenObject = JSON.parse(idTokenString);
if (isIdToken(idTokenObject)) {
diff --git a/dictation_client/src/pages/TermsPage/index.tsx b/dictation_client/src/pages/TermsPage/index.tsx
index 974487e..52f2a0b 100644
--- a/dictation_client/src/pages/TermsPage/index.tsx
+++ b/dictation_client/src/pages/TermsPage/index.tsx
@@ -18,10 +18,19 @@ import {
} from "features//terms";
import { selectLocalStorageKeyforIdToken } from "features/login";
import { useNavigate } from "react-router-dom";
+import {
+ clearToken,
+ isAdminUser,
+ isApproveTier,
+ isStandardUser,
+ loadAccessToken,
+} from "features/auth";
+import { useMsal } from "@azure/msal-react";
const TermsPage: React.FC = (): JSX.Element => {
const [t] = useTranslation();
const dispatch: AppDispatch = useDispatch();
+ const { instance } = useMsal();
const navigate = useNavigate();
const updateAccceptVersions = useSelector(selectTermVersions);
const localStorageKeyforIdToken = useSelector(
@@ -40,6 +49,34 @@ const TermsPage: React.FC = (): JSX.Element => {
// 画面起動時
useEffect(() => {
+ // ログイン済みの場合、ログイン後の遷移先を決定する
+ if (loadAccessToken()) {
+ // 第一~第四階層の管理者はライセンス画面へ遷移
+ if (
+ isApproveTier([TIERS.TIER1, TIERS.TIER2, TIERS.TIER3, TIERS.TIER4]) &&
+ isAdminUser()
+ ) {
+ navigate("/license");
+ return;
+ }
+ // 第五階層の管理者はユーザー画面へ遷移
+ if (isApproveTier([TIERS.TIER5]) && isAdminUser()) {
+ navigate("/user");
+ return;
+ }
+ // 一般ユーザーはdictationPageへ遷移
+ if (isStandardUser()) {
+ navigate("/dictations");
+ return;
+ }
+ // それ以外は認証エラー画面へ遷移
+ instance.logoutRedirect({
+ postLogoutRedirectUri: "/AuthError",
+ });
+ clearToken();
+ return;
+ }
+
dispatch(getTermsInfoAsync());
if (localStorageKeyforIdToken) {
dispatch(getAccountInfoMinimalAccessAsync({ localStorageKeyforIdToken }));
diff --git a/dictation_client/src/pages/UserListPage/index.tsx b/dictation_client/src/pages/UserListPage/index.tsx
index 46f1223..a1de616 100644
--- a/dictation_client/src/pages/UserListPage/index.tsx
+++ b/dictation_client/src/pages/UserListPage/index.tsx
@@ -174,9 +174,6 @@ const UserListPage: React.FC = (): JSX.Element => {
{t(getTranslationID("userListPage.label.autoRenew"))}
-
- {t(getTranslationID("userListPage.label.licenseAlert"))}
-
{t(getTranslationID("userListPage.label.notification"))}
@@ -292,7 +289,6 @@ const UserListPage: React.FC = (): JSX.Element => {
{boolToElement(user.autoRenew)}
- {boolToElement(user.licenseAlert)}
{boolToElement(user.notification)}
{boolToElement(user.emailVerified)}
diff --git a/dictation_client/src/pages/UserListPage/popup.tsx b/dictation_client/src/pages/UserListPage/popup.tsx
index 50ed98f..97b3301 100644
--- a/dictation_client/src/pages/UserListPage/popup.tsx
+++ b/dictation_client/src/pages/UserListPage/popup.tsx
@@ -10,7 +10,6 @@ import {
changeRole,
changeAuthorId,
changeAutoRenew,
- changeLicenseAlert,
changeNotification,
cleanupAddUser,
addUserAsync,
@@ -324,22 +323,6 @@ export const UserAddPopup: React.FC = (props) => {
{t(getTranslationID("userListPage.label.autoRenew"))}
-
-
- {
- dispatch(
- changeLicenseAlert({ licenseAlert: e.target.checked })
- );
- }}
- />
- {t(getTranslationID("userListPage.label.licenseAlert"))}
-
-
= (props) => {
{t(getTranslationID("userListPage.label.autoRenew"))}
-
-
- {
- dispatch(
- changeUpdateLicenseAlert({
- licenseAlert: e.target.checked,
- })
- );
- }}
- />
- {t(getTranslationID("userListPage.label.licenseAlert"))}
-
-
{
+ const { audioFileId } = params;
+
+ // AuthGuardでチェック済みなのでここでのアクセストークンチェックはしない
+ const accessToken = retrieveAuthorizationToken(req);
+ if (!accessToken) {
+ throw new HttpException(
+ makeErrorResponse('E000107'),
+ HttpStatus.UNAUTHORIZED,
+ );
+ }
+
+ const ip = retrieveIp(req);
+ if (!ip) {
+ throw new HttpException(
+ makeErrorResponse('E000401'),
+ HttpStatus.UNAUTHORIZED,
+ );
+ }
+
+ const requestId = retrieveRequestId(req);
+ if (!requestId) {
+ throw new HttpException(
+ makeErrorResponse('E000501'),
+ HttpStatus.INTERNAL_SERVER_ERROR,
+ );
+ }
+
+ const decodedAccessToken = jwt.decode(accessToken, { json: true });
+ if (!decodedAccessToken) {
+ throw new HttpException(
+ makeErrorResponse('E000101'),
+ HttpStatus.UNAUTHORIZED,
+ );
+ }
+ const { userId } = decodedAccessToken as AccessToken;
+
+ const context = makeContext(userId, requestId);
+ this.logger.log(`[${context.getTrackingId()}] ip : ${ip}`);
+
+ // TODO: Task削除処理を実装する
+ console.log(audioFileId);
+ return {};
+ }
}
diff --git a/dictation_server/src/features/tasks/test/tasks.service.mock.ts b/dictation_server/src/features/tasks/test/tasks.service.mock.ts
index 94d3e7d..70dc66a 100644
--- a/dictation_server/src/features/tasks/test/tasks.service.mock.ts
+++ b/dictation_server/src/features/tasks/test/tasks.service.mock.ts
@@ -338,7 +338,6 @@ export const makeDefaultUsersRepositoryMockValue =
user1.role = 'admin';
user1.email_verified = true;
user1.auto_renew = false;
- user1.license_alert = false;
user1.notification = false;
user1.deleted_at = null;
user1.created_by = 'test';
@@ -482,7 +481,6 @@ const defaultTasksRepositoryMockValue: {
accepted_dpa_version: '',
email_verified: true,
auto_renew: true,
- license_alert: true,
notification: true,
encryption: false,
prompt: false,
diff --git a/dictation_server/src/features/tasks/types/types.ts b/dictation_server/src/features/tasks/types/types.ts
index 2a6ed96..33ba3d1 100644
--- a/dictation_server/src/features/tasks/types/types.ts
+++ b/dictation_server/src/features/tasks/types/types.ts
@@ -227,3 +227,13 @@ export class PostCheckoutPermissionRequest {
}
export class PostCheckoutPermissionResponse {}
+
+export class PostDeleteTaskRequest {
+ @ApiProperty({ description: 'ODMS Cloud上の音声ファイルID' })
+ @Type(() => Number)
+ @IsInt()
+ @Min(1)
+ audioFileId: number;
+}
+
+export class PostDeleteTaskResponse {}
diff --git a/dictation_server/src/features/users/test/users.service.mock.ts b/dictation_server/src/features/users/test/users.service.mock.ts
index 4c77d9c..0984d0f 100644
--- a/dictation_server/src/features/users/test/users.service.mock.ts
+++ b/dictation_server/src/features/users/test/users.service.mock.ts
@@ -331,7 +331,6 @@ export const makeDefaultUsersRepositoryMockValue =
user1.accepted_dpa_version = '1.0';
user1.email_verified = true;
user1.auto_renew = false;
- user1.license_alert = false;
user1.notification = false;
user1.encryption = false;
user1.prompt = false;
@@ -351,7 +350,6 @@ export const makeDefaultUsersRepositoryMockValue =
user2.accepted_dpa_version = '1.0';
user2.email_verified = true;
user2.auto_renew = false;
- user2.license_alert = false;
user2.notification = false;
user2.encryption = false;
user2.prompt = false;
diff --git a/dictation_server/src/features/users/types/types.ts b/dictation_server/src/features/users/types/types.ts
index 4478c13..80b1a13 100644
--- a/dictation_server/src/features/users/types/types.ts
+++ b/dictation_server/src/features/users/types/types.ts
@@ -1,5 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
-import { IsBoolean, IsEmail, IsIn, IsInt, IsOptional, MaxLength } from 'class-validator';
+import {
+ IsBoolean,
+ IsEmail,
+ IsIn,
+ IsInt,
+ IsOptional,
+ MaxLength,
+} from 'class-validator';
import {
TASK_LIST_SORTABLE_ATTRIBUTES,
USER_LICENSE_STATUS,
@@ -44,9 +51,6 @@ export class User {
@ApiProperty()
autoRenew: boolean;
- @ApiProperty()
- licenseAlert: boolean;
-
@ApiProperty()
notification: boolean;
@@ -97,11 +101,6 @@ export class SignupRequest {
@IsBoolean()
autoRenew: boolean;
- @ApiProperty()
- @Type(() => Boolean)
- @IsBoolean()
- licenseAlert: boolean;
-
@ApiProperty()
@Type(() => Boolean)
@IsBoolean()
@@ -233,11 +232,6 @@ export class PostUpdateUserRequest {
@IsBoolean()
autoRenew: boolean;
- @ApiProperty()
- @Type(() => Boolean)
- @IsBoolean()
- licenseAlart: boolean;
-
@ApiProperty()
@Type(() => Boolean)
@IsBoolean()
diff --git a/dictation_server/src/features/users/users.controller.ts b/dictation_server/src/features/users/users.controller.ts
index 036e609..d607e50 100644
--- a/dictation_server/src/features/users/users.controller.ts
+++ b/dictation_server/src/features/users/users.controller.ts
@@ -249,7 +249,6 @@ export class UsersController {
role,
email,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -301,7 +300,6 @@ export class UsersController {
role as UserRoles,
email,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -569,7 +567,6 @@ export class UsersController {
role,
authorId,
autoRenew,
- licenseAlart,
notification,
encryption,
encryptionPassword,
@@ -619,7 +616,6 @@ export class UsersController {
role,
authorId,
autoRenew,
- licenseAlart,
notification,
encryption,
encryptionPassword,
diff --git a/dictation_server/src/features/users/users.service.spec.ts b/dictation_server/src/features/users/users.service.spec.ts
index ff3295e..82a8199 100644
--- a/dictation_server/src/features/users/users.service.spec.ts
+++ b/dictation_server/src/features/users/users.service.spec.ts
@@ -221,7 +221,6 @@ describe('UsersService.confirmUserAndInitPassword', () => {
updated_by: 'string;',
updated_at: new Date(),
auto_renew: true,
- license_alert: true,
notification: true,
encryption: false,
prompt: false,
@@ -273,7 +272,6 @@ describe('UsersService.confirmUserAndInitPassword', () => {
updated_by: 'string;',
updated_at: new Date(),
auto_renew: true,
- license_alert: true,
notification: true,
encryption: false,
prompt: false,
@@ -324,7 +322,6 @@ describe('UsersService.confirmUserAndInitPassword', () => {
updated_by: 'string;',
updated_at: new Date(),
auto_renew: true,
- license_alert: true,
notification: true,
encryption: false,
prompt: false,
@@ -380,7 +377,6 @@ describe('UsersService.confirmUserAndInitPassword', () => {
updated_by: 'string;',
updated_at: new Date(),
auto_renew: true,
- license_alert: true,
notification: true,
encryption: false,
prompt: false,
@@ -494,7 +490,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
),
).toEqual(undefined);
@@ -507,7 +502,6 @@ describe('UsersService.createUser', () => {
expect(user?.author_id).toEqual(null);
expect(user?.email_verified).toEqual(false);
expect(user?.auto_renew).toEqual(autoRenew);
- expect(user?.license_alert).toEqual(licenseAlert);
expect(user?.notification).toEqual(notification);
expect(user?.encryption).toEqual(false);
expect(user?.encryption_password).toEqual(null);
@@ -574,7 +568,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -591,7 +584,6 @@ describe('UsersService.createUser', () => {
expect(user?.author_id).toEqual(authorId);
expect(user?.email_verified).toEqual(false);
expect(user?.auto_renew).toEqual(autoRenew);
- expect(user?.license_alert).toEqual(licenseAlert);
expect(user?.notification).toEqual(notification);
expect(user?.encryption).toEqual(encryption);
expect(user?.encryption_password).toEqual(encryptionPassword);
@@ -657,7 +649,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -674,7 +665,6 @@ describe('UsersService.createUser', () => {
expect(user?.author_id).toEqual(authorId);
expect(user?.email_verified).toEqual(false);
expect(user?.auto_renew).toEqual(autoRenew);
- expect(user?.license_alert).toEqual(licenseAlert);
expect(user?.notification).toEqual(notification);
expect(user?.encryption).toEqual(encryption);
expect(user?.encryption_password).toBeNull();
@@ -737,7 +727,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
),
).toEqual(undefined);
@@ -750,7 +739,6 @@ describe('UsersService.createUser', () => {
expect(user?.author_id).toBeNull();
expect(user?.email_verified).toEqual(false);
expect(user?.auto_renew).toEqual(autoRenew);
- expect(user?.license_alert).toEqual(licenseAlert);
expect(user?.notification).toEqual(notification);
expect(user?.encryption).toEqual(false);
expect(user?.encryption_password).toBeNull();
@@ -817,7 +805,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
);
} catch (e) {
@@ -896,7 +883,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
);
} catch (e) {
@@ -958,7 +944,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
);
} catch (e) {
@@ -1018,7 +1003,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
);
} catch (e) {
@@ -1086,7 +1070,6 @@ describe('UsersService.createUser', () => {
role,
email_1,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -1127,7 +1110,6 @@ describe('UsersService.createUser', () => {
role,
email_2,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -1209,7 +1191,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -1284,7 +1265,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
);
} catch (e) {
@@ -1361,7 +1341,6 @@ describe('UsersService.createUser', () => {
role,
email,
autoRenew,
- licenseAlert,
notification,
);
} catch (e) {
@@ -1458,7 +1437,6 @@ describe('UsersService.getUsers', () => {
email: 'test1@mail.com',
emailVerified: true,
autoRenew: true,
- licenseAlert: true,
notification: true,
encryption: false,
prompt: false,
@@ -1475,7 +1453,6 @@ describe('UsersService.getUsers', () => {
email: 'test2@mail.com',
emailVerified: true,
autoRenew: true,
- licenseAlert: true,
notification: true,
encryption: false,
prompt: false,
@@ -1492,7 +1469,6 @@ describe('UsersService.getUsers', () => {
email: 'test3@mail.com',
emailVerified: true,
autoRenew: true,
- licenseAlert: true,
notification: true,
encryption: false,
prompt: false,
@@ -1571,7 +1547,6 @@ describe('UsersService.getUsers', () => {
email: 'test1@mail.com',
emailVerified: true,
autoRenew: true,
- licenseAlert: true,
notification: true,
encryption: false,
prompt: false,
@@ -1590,7 +1565,6 @@ describe('UsersService.getUsers', () => {
email: 'test2@mail.com',
emailVerified: true,
autoRenew: true,
- licenseAlert: true,
notification: true,
encryption: false,
prompt: false,
@@ -1609,7 +1583,6 @@ describe('UsersService.getUsers', () => {
email: 'test3@mail.com',
emailVerified: true,
autoRenew: false,
- licenseAlert: true,
notification: true,
encryption: false,
prompt: false,
@@ -1927,7 +1900,6 @@ describe('UsersService.updateUser', () => {
undefined,
false,
false,
- false,
undefined,
undefined,
undefined,
@@ -1940,7 +1912,6 @@ describe('UsersService.updateUser', () => {
expect(createdUser?.role).toBe(USER_ROLES.NONE);
expect(createdUser?.author_id).toBeNull();
expect(createdUser?.auto_renew).toBe(false);
- expect(createdUser?.license_alert).toBe(false);
expect(createdUser?.notification).toBe(false);
expect(createdUser?.encryption).toBe(false);
expect(createdUser?.encryption_password).toBeNull();
@@ -1987,7 +1958,6 @@ describe('UsersService.updateUser', () => {
undefined,
false,
false,
- false,
undefined,
undefined,
undefined,
@@ -2000,7 +1970,6 @@ describe('UsersService.updateUser', () => {
expect(createdUser?.role).toBe(USER_ROLES.TYPIST);
expect(createdUser?.author_id).toBeNull();
expect(createdUser?.auto_renew).toBe(false);
- expect(createdUser?.license_alert).toBe(false);
expect(createdUser?.notification).toBe(false);
expect(createdUser?.encryption).toBe(false);
expect(createdUser?.encryption_password).toBeNull();
@@ -2047,7 +2016,6 @@ describe('UsersService.updateUser', () => {
'AUTHOR_ID',
false,
false,
- false,
true,
'new_password',
true,
@@ -2060,7 +2028,6 @@ describe('UsersService.updateUser', () => {
expect(createdUser?.role).toBe(USER_ROLES.AUTHOR);
expect(createdUser?.author_id).toBe('AUTHOR_ID');
expect(createdUser?.auto_renew).toBe(false);
- expect(createdUser?.license_alert).toBe(false);
expect(createdUser?.notification).toBe(false);
expect(createdUser?.encryption).toBe(true);
expect(createdUser?.encryption_password).toBe('new_password');
@@ -2107,7 +2074,6 @@ describe('UsersService.updateUser', () => {
undefined,
false,
false,
- false,
undefined,
undefined,
undefined,
@@ -2120,7 +2086,6 @@ describe('UsersService.updateUser', () => {
expect(createdUser?.role).toBe(USER_ROLES.TYPIST);
expect(createdUser?.author_id).toBeNull();
expect(createdUser?.auto_renew).toBe(false);
- expect(createdUser?.license_alert).toBe(false);
expect(createdUser?.notification).toBe(false);
expect(createdUser?.encryption).toBe(false);
expect(createdUser?.encryption_password).toBeNull();
@@ -2168,7 +2133,6 @@ describe('UsersService.updateUser', () => {
false,
false,
false,
- false,
undefined,
false,
),
@@ -2180,7 +2144,6 @@ describe('UsersService.updateUser', () => {
expect(createdUser?.role).toBe(USER_ROLES.AUTHOR);
expect(createdUser?.author_id).toBe('AUTHOR_ID');
expect(createdUser?.auto_renew).toBe(false);
- expect(createdUser?.license_alert).toBe(false);
expect(createdUser?.notification).toBe(false);
expect(createdUser?.encryption).toBe(false);
expect(createdUser?.encryption_password).toBeNull();
@@ -2227,7 +2190,6 @@ describe('UsersService.updateUser', () => {
undefined,
false,
false,
- false,
undefined,
undefined,
undefined,
@@ -2277,7 +2239,6 @@ describe('UsersService.updateUser', () => {
'AUTHOR_ID',
false,
false,
- false,
true,
undefined,
true,
@@ -2290,7 +2251,6 @@ describe('UsersService.updateUser', () => {
expect(createdUser?.role).toBe(USER_ROLES.AUTHOR);
expect(createdUser?.author_id).toBe('AUTHOR_ID');
expect(createdUser?.auto_renew).toBe(false);
- expect(createdUser?.license_alert).toBe(false);
expect(createdUser?.notification).toBe(false);
expect(createdUser?.encryption).toBe(true);
expect(createdUser?.encryption_password).toBe('password');
@@ -2338,7 +2298,6 @@ describe('UsersService.updateUser', () => {
false,
false,
false,
- false,
'password',
true,
),
@@ -2350,7 +2309,6 @@ describe('UsersService.updateUser', () => {
expect(createdUser?.role).toBe(USER_ROLES.AUTHOR);
expect(createdUser?.author_id).toBe('AUTHOR_ID');
expect(createdUser?.auto_renew).toBe(false);
- expect(createdUser?.license_alert).toBe(false);
expect(createdUser?.notification).toBe(false);
expect(createdUser?.encryption).toBe(false);
expect(createdUser?.encryption_password).toBeNull();
@@ -2397,7 +2355,6 @@ describe('UsersService.updateUser', () => {
'AUTHOR_ID',
false,
false,
- false,
true,
undefined,
true,
@@ -2458,7 +2415,6 @@ describe('UsersService.updateUser', () => {
'AUTHOR_ID2',
false,
false,
- false,
true,
undefined,
true,
diff --git a/dictation_server/src/features/users/users.service.ts b/dictation_server/src/features/users/users.service.ts
index 84e54fc..e48e24f 100644
--- a/dictation_server/src/features/users/users.service.ts
+++ b/dictation_server/src/features/users/users.service.ts
@@ -148,18 +148,18 @@ export class UsersService {
/**
* Creates user
- * @param accessToken
+ * @param context
+ * @param externalId
* @param name
* @param role
* @param email
* @param autoRenew
- * @param licenseAlert
* @param notification
* @param [authorId]
* @param [encryption]
* @param [encryptionPassword]
* @param [prompt]
- * @returns void
+ * @returns user
*/
async createUser(
context: Context,
@@ -168,7 +168,6 @@ export class UsersService {
role: UserRoles,
email: string,
autoRenew: boolean,
- licenseAlert: boolean,
notification: boolean,
authorId?: string | undefined,
encryption?: boolean | undefined,
@@ -180,7 +179,6 @@ export class UsersService {
`externalId: ${externalId}, ` +
`role: ${role}, ` +
`autoRenew: ${autoRenew}, ` +
- `licenseAlert: ${licenseAlert}, ` +
`notification: ${notification}, ` +
`authorId: ${authorId}, ` +
`encryption: ${encryption}, ` +
@@ -272,7 +270,6 @@ export class UsersService {
accountId,
externalUser.sub,
autoRenew,
- licenseAlert,
notification,
authorId,
encryption,
@@ -408,7 +405,6 @@ export class UsersService {
accountId: number,
externalId: string,
autoRenew: boolean,
- licenseAlert: boolean,
notification: boolean,
authorId?: string | undefined,
encryption?: boolean | undefined,
@@ -424,7 +420,6 @@ export class UsersService {
`authorId: ${authorId}, ` +
`externalId: ${externalId}, ` +
`autoRenew: ${autoRenew}, ` +
- `licenseAlert: ${licenseAlert}, ` +
`notification: ${notification}, ` +
`authorId: ${authorId}, ` +
`encryption: ${encryption}, ` +
@@ -438,7 +433,6 @@ export class UsersService {
account_id: accountId,
external_id: externalId,
auto_renew: autoRenew,
- license_alert: licenseAlert,
notification,
role,
accepted_dpa_version: null,
@@ -454,7 +448,6 @@ export class UsersService {
account_id: accountId,
external_id: externalId,
auto_renew: autoRenew,
- license_alert: licenseAlert,
notification,
role,
author_id: authorId ?? null,
@@ -671,7 +664,6 @@ export class UsersService {
email: mail,
emailVerified: dbUser.email_verified,
autoRenew: dbUser.auto_renew,
- licenseAlert: dbUser.license_alert,
notification: dbUser.notification,
encryption: dbUser.encryption,
prompt: dbUser.prompt,
@@ -901,14 +893,13 @@ export class UsersService {
}
/**
- * 指定したユーザーの情報を更新します
+ * Updates user
* @param context
* @param extarnalId
* @param id
* @param role
* @param authorId
* @param autoRenew
- * @param licenseAlart
* @param notification
* @param encryption
* @param encryptionPassword
@@ -922,7 +913,6 @@ export class UsersService {
role: string,
authorId: string | undefined,
autoRenew: boolean,
- licenseAlart: boolean,
notification: boolean,
encryption: boolean | undefined,
encryptionPassword: string | undefined,
@@ -938,7 +928,6 @@ export class UsersService {
`role: ${role}, ` +
`authorId: ${authorId}, ` +
`autoRenew: ${autoRenew}, ` +
- `licenseAlart: ${licenseAlart}, ` +
`notification: ${notification}, ` +
`encryption: ${encryption}, ` +
`prompt: ${prompt} }`,
@@ -957,7 +946,6 @@ export class UsersService {
role,
authorId,
autoRenew,
- licenseAlart,
notification,
encryption,
encryptionPassword,
diff --git a/dictation_server/src/repositories/accounts/accounts.repository.service.ts b/dictation_server/src/repositories/accounts/accounts.repository.service.ts
index 2d0d78c..6d7c758 100644
--- a/dictation_server/src/repositories/accounts/accounts.repository.service.ts
+++ b/dictation_server/src/repositories/accounts/accounts.repository.service.ts
@@ -59,7 +59,11 @@ import {
deleteEntity,
} from '../../common/repository';
import { Context } from '../../common/log';
-import { LicenseSummaryInfo, PartnerInfoFromDb, PartnerLicenseInfoForRepository } from '../../features/accounts/types/types';
+import {
+ LicenseSummaryInfo,
+ PartnerInfoFromDb,
+ PartnerLicenseInfoForRepository,
+} from '../../features/accounts/types/types';
@Injectable()
export class AccountsRepositoryService {
diff --git a/dictation_server/src/repositories/users/entity/user.entity.ts b/dictation_server/src/repositories/users/entity/user.entity.ts
index 0f4e57c..0666afb 100644
--- a/dictation_server/src/repositories/users/entity/user.entity.ts
+++ b/dictation_server/src/repositories/users/entity/user.entity.ts
@@ -46,9 +46,6 @@ export class User {
@Column({ default: true })
auto_renew: boolean;
- @Column({ default: true })
- license_alert: boolean;
-
@Column({ default: true })
notification: boolean;
@@ -127,9 +124,6 @@ export class UserArchive {
@Column()
auto_renew: boolean;
- @Column()
- license_alert: boolean;
-
@Column()
notification: boolean;
diff --git a/dictation_server/src/repositories/users/users.repository.service.ts b/dictation_server/src/repositories/users/users.repository.service.ts
index 2fb67af..9237bdd 100644
--- a/dictation_server/src/repositories/users/users.repository.service.ts
+++ b/dictation_server/src/repositories/users/users.repository.service.ts
@@ -67,7 +67,6 @@ export class UsersRepositoryService {
external_id: externalUserId,
role,
auto_renew,
- license_alert,
notification,
author_id,
accepted_eula_version,
@@ -82,7 +81,6 @@ export class UsersRepositoryService {
userEntity.account_id = accountId;
userEntity.external_id = externalUserId;
userEntity.auto_renew = auto_renew;
- userEntity.license_alert = license_alert;
userEntity.notification = notification;
userEntity.author_id = author_id;
userEntity.accepted_eula_version = accepted_eula_version;
@@ -278,7 +276,6 @@ export class UsersRepositoryService {
role: string,
authorId: string | undefined,
autoRenew: boolean,
- licenseAlart: boolean,
notification: boolean,
encryption: boolean | undefined,
encryptionPassword: string | undefined,
@@ -345,7 +342,6 @@ export class UsersRepositoryService {
// 共通項目を更新
targetUser.role = role;
targetUser.auto_renew = autoRenew;
- targetUser.license_alert = licenseAlart;
targetUser.notification = notification;
const result = await updateEntity(
diff --git a/dictation_server/src/templates/template_U_113.html b/dictation_server/src/templates/template_U_113.html
index 4745d21..708545f 100644
--- a/dictation_server/src/templates/template_U_113.html
+++ b/dictation_server/src/templates/template_U_113.html
@@ -12,7 +12,7 @@
password for security reasons. To change your password, click on [Forgot
your password?] link on the ODMS Cloud Sign in screen.
- Temporary password:$TEMPORARY_PASSWORD$
+ Temporary password: $TEMPORARY_PASSWORD$
If you need support regarding ODMS Cloud, please contact
$PRIMARY_ADMIN_NAME$.
@@ -34,7 +34,7 @@
Passwort zu ändern, klicken Sie auf dem ODMS Cloud-Anmeldebildschirm auf
den Link [Kennwort vergessen?].
- Temporäres Passwort:$TEMPORARY_PASSWORD$
+ Temporäres Passwort: $TEMPORARY_PASSWORD$
Wenn Sie Unterstützung bezüglich ODMS Cloud benötigen, wenden Sie sich
bitte an $PRIMARY_ADMIN_NAME$.
@@ -57,7 +57,7 @@
lien [Vous avez oublié votre mot de passe ?] sur l'écran de connexion
ODMS Cloud.
- Temporary password:$TEMPORARY_PASSWORD$
+ Temporary password: $TEMPORARY_PASSWORD$
Si vous avez besoin d'assistance concernant ODMS Cloud, veuillez
contacter $PRIMARY_ADMIN_NAME$.
diff --git a/dictation_server/src/templates/template_U_113.txt b/dictation_server/src/templates/template_U_113.txt
index 5c444c6..f84bd50 100644
--- a/dictation_server/src/templates/template_U_113.txt
+++ b/dictation_server/src/templates/template_U_113.txt
@@ -2,7 +2,7 @@
Your user registration has been completed. Please login to ODMS Cloud with the following temporary password. You may continue using your temporary password; however, we strongly recommend that you change your password for security reasons. To change your password, click on [Forgot your password?] link on the ODMS Cloud Sign in screen.
-Temporary password:$TEMPORARY_PASSWORD$
+Temporary password: $TEMPORARY_PASSWORD$
If you need support regarding ODMS Cloud, please contact $PRIMARY_ADMIN_NAME$.
@@ -13,7 +13,7 @@ This is an automatically generated e-mail and this mailbox is not monitored. P
Ihre Benutzerregistrierung ist abgeschlossen. Bitte melden Sie sich mit dem folgenden temporären Passwort bei ODMS Cloud an. Sie können Ihr temporäres Passwort weiterhin verwenden; Aus Sicherheitsgründen empfehlen wir Ihnen jedoch dringend, Ihr Passwort zu ändern. Um Ihr Passwort zu ändern, klicken Sie auf dem ODMS Cloud-Anmeldebildschirm auf den Link [Kennwort vergessen?].
-Temporäres Passwort:$TEMPORARY_PASSWORD$
+Temporäres Passwort: $TEMPORARY_PASSWORD$
Wenn Sie Unterstützung bezüglich ODMS Cloud benötigen, wenden Sie sich bitte an $PRIMARY_ADMIN_NAME$.
@@ -24,7 +24,7 @@ Dies ist eine automatisch generierte E-Mail und dieses Postfach wird nicht über
Votre inscription d'utilisateur est terminée. Veuillez vous connecter à ODMS Cloud avec le mot de passe temporaire suivant. Vous pouvez continuer à utiliser votre mot de passe temporaire ; cependant, nous vous recommandons fortement de changer votre mot de passe pour des raisons de sécurité. Pour modifier votre mot de passe, cliquez sur le lien [Vous avez oublié votre mot de passe ?] sur l'écran de connexion ODMS Cloud.
-Temporary password:$TEMPORARY_PASSWORD$
+Temporary password: $TEMPORARY_PASSWORD$
Si vous avez besoin d'assistance concernant ODMS Cloud, veuillez contacter $PRIMARY_ADMIN_NAME$.