Merged PR 671: 「LicenseAlert」を消す対応
## 概要 [Task3381: 対応](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3381) - 以下の画面から「LicenseAlert」を削除 - ユーザー追加Popup - ユーザー更新Popup - ユーザー一覧画面 - 以下のAPIの引数から「LicenseAlert」の設定をするパラメータを削除 - ユーザー作成API(users/signup) - ユーザー更新API(users/update) - ユーザー一覧取得APIのレスポンスから「LicenseAlert」を削除 - usersEntityから「LicenseAlert」を削除 - クライアントのAPI呼び出し部分を自動生成するopenapi-generator-cliのバージョンを7.1.0で固定 - 最新バージョン(7.2.0)はaxiosのバージョン1.x用になるため - https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.2.0 ## レビューポイント - openapi-generator-cliのバージョンを固定するのではなく、axiosのバージョンを上げたほうがよいか - axiosのバージョン1.xが出たのがおととしになるのでそろそろ上げてもいい? - このタイミングでメジャーバージョンを上げるのはどうか - 基本的な仕様について大きくは変わってない模様 - 実際に上げてみて軽く動作確認してみたが問題なかった ## UIの変更 - Before/Afterのスクショなど - https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task3381?csf=1&web=1&e=TpXHES ## 補足 - 相談、参考資料などがあれば
This commit is contained in:
parent
cbf7622909
commit
c4efaf1a1a
@ -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/
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -164,7 +164,6 @@ export const updateUserAsync = createAsyncThunk<
|
||||
encryptionPassword,
|
||||
prompt,
|
||||
autoRenew: updateUser.autoRenew,
|
||||
licenseAlart: updateUser.licenseAlert,
|
||||
notification: updateUser.notification,
|
||||
},
|
||||
{
|
||||
|
||||
@ -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を返却する
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -174,9 +174,6 @@ const UserListPage: React.FC = (): JSX.Element => {
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.autoRenew"))}
|
||||
</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.licenseAlert"))}
|
||||
</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.notification"))}
|
||||
</th>
|
||||
@ -292,7 +289,6 @@ const UserListPage: React.FC = (): JSX.Element => {
|
||||
</span>
|
||||
</td>
|
||||
<td>{boolToElement(user.autoRenew)}</td>
|
||||
<td>{boolToElement(user.licenseAlert)}</td>
|
||||
<td>{boolToElement(user.notification)}</td>
|
||||
<td>{boolToElement(user.emailVerified)}</td>
|
||||
</tr>
|
||||
|
||||
@ -10,7 +10,6 @@ import {
|
||||
changeRole,
|
||||
changeAuthorId,
|
||||
changeAutoRenew,
|
||||
changeLicenseAlert,
|
||||
changeNotification,
|
||||
cleanupAddUser,
|
||||
addUserAsync,
|
||||
@ -324,22 +323,6 @@ export const UserAddPopup: React.FC<UserAddPopupProps> = (props) => {
|
||||
{t(getTranslationID("userListPage.label.autoRenew"))}
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label htmlFor="add_LicenseAlert">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="add_LicenseAlert"
|
||||
checked={addUser.licenseAlert}
|
||||
className={styles.formCheck}
|
||||
onChange={(e) => {
|
||||
dispatch(
|
||||
changeLicenseAlert({ licenseAlert: e.target.checked })
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{t(getTranslationID("userListPage.label.licenseAlert"))}
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label htmlFor="add_Notification">
|
||||
<input
|
||||
|
||||
@ -9,7 +9,6 @@ import {
|
||||
changeUpdateAutoRenew,
|
||||
changeUpdateEncryption,
|
||||
changeUpdateEncryptionPassword,
|
||||
changeUpdateLicenseAlert,
|
||||
changeUpdateNotification,
|
||||
changeUpdatePrompt,
|
||||
changeUpdateRole,
|
||||
@ -336,24 +335,6 @@ export const UserUpdatePopup: React.FC<UserUpdatePopupProps> = (props) => {
|
||||
{t(getTranslationID("userListPage.label.autoRenew"))}
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label htmlFor="edit_LicenseAlert">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="edit_LicenseAlert"
|
||||
className={styles.formCheck}
|
||||
checked={user.licenseAlert}
|
||||
onChange={(e) => {
|
||||
dispatch(
|
||||
changeUpdateLicenseAlert({
|
||||
licenseAlert: e.target.checked,
|
||||
})
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{t(getTranslationID("userListPage.label.licenseAlert"))}
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label htmlFor="edit_Notification">
|
||||
<input
|
||||
|
||||
@ -4087,7 +4087,6 @@
|
||||
"email": { "type": "string" },
|
||||
"emailVerified": { "type": "boolean" },
|
||||
"autoRenew": { "type": "boolean" },
|
||||
"licenseAlert": { "type": "boolean" },
|
||||
"notification": { "type": "boolean" },
|
||||
"encryption": { "type": "boolean" },
|
||||
"prompt": { "type": "boolean" },
|
||||
@ -4106,7 +4105,6 @@
|
||||
"email",
|
||||
"emailVerified",
|
||||
"autoRenew",
|
||||
"licenseAlert",
|
||||
"notification",
|
||||
"encryption",
|
||||
"prompt",
|
||||
@ -4131,20 +4129,12 @@
|
||||
"authorId": { "type": "string" },
|
||||
"email": { "type": "string" },
|
||||
"autoRenew": { "type": "boolean" },
|
||||
"licenseAlert": { "type": "boolean" },
|
||||
"notification": { "type": "boolean" },
|
||||
"encryption": { "type": "boolean" },
|
||||
"encryptionPassword": { "type": "string" },
|
||||
"prompt": { "type": "boolean" }
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"role",
|
||||
"email",
|
||||
"autoRenew",
|
||||
"licenseAlert",
|
||||
"notification"
|
||||
]
|
||||
"required": ["name", "role", "email", "autoRenew", "notification"]
|
||||
},
|
||||
"SignupResponse": { "type": "object", "properties": {} },
|
||||
"OptionItem": {
|
||||
@ -4260,13 +4250,12 @@
|
||||
"role": { "type": "string", "description": "none/author/typist" },
|
||||
"authorId": { "type": "string" },
|
||||
"autoRenew": { "type": "boolean" },
|
||||
"licenseAlart": { "type": "boolean" },
|
||||
"notification": { "type": "boolean" },
|
||||
"encryption": { "type": "boolean" },
|
||||
"encryptionPassword": { "type": "string" },
|
||||
"prompt": { "type": "boolean" }
|
||||
},
|
||||
"required": ["id", "role", "autoRenew", "licenseAlart", "notification"]
|
||||
"required": ["id", "role", "autoRenew", "notification"]
|
||||
},
|
||||
"PostUpdateUserResponse": { "type": "object", "properties": {} },
|
||||
"AllocateLicenseRequest": {
|
||||
|
||||
@ -187,7 +187,6 @@ export const makeTestAccount = async (
|
||||
accepted_dpa_version: d?.accepted_dpa_version ?? '1.0',
|
||||
email_verified: d?.email_verified ?? true,
|
||||
auto_renew: d?.auto_renew ?? true,
|
||||
license_alert: d?.license_alert ?? true,
|
||||
notification: d?.notification ?? true,
|
||||
encryption: d?.encryption ?? true,
|
||||
encryption_password: d?.encryption_password ?? 'password',
|
||||
@ -295,7 +294,6 @@ export const makeTestUser = async (
|
||||
accepted_dpa_version: d?.accepted_dpa_version ?? '1.0',
|
||||
email_verified: d?.email_verified ?? true,
|
||||
auto_renew: d?.auto_renew ?? true,
|
||||
license_alert: d?.license_alert ?? true,
|
||||
notification: d?.notification ?? true,
|
||||
encryption: d?.encryption ?? true,
|
||||
encryption_password: d?.encryption_password,
|
||||
|
||||
@ -309,7 +309,6 @@ export const makeDefaultAccountsRepositoryMockValue =
|
||||
user.accepted_dpa_version = '1.0';
|
||||
user.email_verified = true;
|
||||
user.auto_renew = false;
|
||||
user.license_alert = false;
|
||||
user.notification = false;
|
||||
user.deleted_at = null;
|
||||
user.created_by = 'test';
|
||||
@ -339,7 +338,6 @@ export const makeDefaultUsersRepositoryMockValue =
|
||||
user.accepted_dpa_version = '1.0';
|
||||
user.email_verified = true;
|
||||
user.auto_renew = false;
|
||||
user.license_alert = false;
|
||||
user.notification = false;
|
||||
user.deleted_at = null;
|
||||
user.created_by = 'test';
|
||||
@ -388,7 +386,6 @@ export const makeDefaultUserGroupsRepositoryMockValue =
|
||||
user.accepted_dpa_version = '1.0';
|
||||
user.email_verified = true;
|
||||
user.auto_renew = false;
|
||||
user.license_alert = false;
|
||||
user.notification = false;
|
||||
user.deleted_at = null;
|
||||
user.created_by = 'test';
|
||||
|
||||
@ -483,7 +483,6 @@ export class UpdateTypistGroupResponse {}
|
||||
|
||||
export class CreatePartnerAccountResponse {}
|
||||
|
||||
|
||||
export class PartnerLicenseInfo {
|
||||
@ApiProperty({ description: 'アカウントID' })
|
||||
accountId: number;
|
||||
@ -523,7 +522,6 @@ export class GetPartnerLicensesResponse {
|
||||
childrenPartnerLicenses: PartnerLicenseInfo[];
|
||||
}
|
||||
|
||||
|
||||
export class LicenseOrder {
|
||||
@ApiProperty({ description: '注文日付' })
|
||||
orderDate: string;
|
||||
@ -546,7 +544,6 @@ export class GetOrderHistoriesResponse {
|
||||
|
||||
export class IssueLicenseResponse {}
|
||||
|
||||
|
||||
export class Dealer {
|
||||
@ApiProperty({ description: 'アカウントID' })
|
||||
id: number;
|
||||
@ -563,7 +560,6 @@ export class GetDealersResponse {
|
||||
|
||||
export class CancelIssueResponse {}
|
||||
|
||||
|
||||
export class Worktype {
|
||||
@ApiProperty({ description: 'WorktypeのID' })
|
||||
id: number;
|
||||
@ -588,7 +584,6 @@ export class CreateWorktypeResponse {}
|
||||
|
||||
export class UpdateWorktypeResponse {}
|
||||
|
||||
|
||||
export class GetWorktypeOptionItem extends PostWorktypeOptionItem {
|
||||
@ApiProperty()
|
||||
id: number;
|
||||
@ -609,7 +604,6 @@ export class DeleteWorktypeResponse {}
|
||||
|
||||
export class PostActiveWorktypeResponse {}
|
||||
|
||||
|
||||
export class Partner {
|
||||
@ApiProperty({ description: '会社名' })
|
||||
name: string;
|
||||
@ -678,4 +672,4 @@ export type PartnerInfoFromDb = {
|
||||
country: string;
|
||||
primaryAccountExternalId: string;
|
||||
dealerManagement: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
@ -148,7 +148,6 @@ export const makeDefaultUsersRepositoryMockValue =
|
||||
updated_by: null,
|
||||
updated_at: new Date(),
|
||||
auto_renew: true,
|
||||
license_alert: true,
|
||||
notification: true,
|
||||
encryption: false,
|
||||
prompt: false,
|
||||
|
||||
@ -120,7 +120,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;
|
||||
|
||||
@ -82,7 +82,6 @@ export const makeDefaultUsersRepositoryMockValue =
|
||||
user.accepted_dpa_version = '1.0';
|
||||
user.email_verified = true;
|
||||
user.auto_renew = false;
|
||||
user.license_alert = false;
|
||||
user.notification = false;
|
||||
user.deleted_at = null;
|
||||
user.created_by = 'test';
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user