replaced autoAccountActivation to autoActivateAccountAfterValidation
MODIFY
src/migration/tasks/MigrateUserSettingsTask.ts
src/migration/tasks/MigrateUserSettingsTask.ts
@@ -24,7 +24,7 @@ export default class MigrateUserSettingsTask extends MigrationTask {
content: {
type: UserSettingsContentType.USER,
user: {
- autoAccountActivation: true
+ autoActivateAccountAfterValidation: true
}
},
createdOn: new Date(),

MODIFY
src/server/rest/v1/service/AuthService.ts
src/server/rest/v1/service/AuthService.ts
@@ -540,7 +540,7 @@ export default class AuthService {
});
}
const userSetting = await SettingStorage.getSettingByIdentifier(tenantID, TechnicalSettingsType.USER);
- const userStatus = userSetting.content.user.autoAccountActivation ? UserStatus.ACTIVE : UserStatus.INACTIVE;
+ const userStatus = userSetting.content.user.autoActivateAccountAfterValidation ? UserStatus.ACTIVE : UserStatus.INACTIVE;
// Save User Status
await UserStorage.saveUserStatus(tenantID, user.id, userStatus);
// For integration with billing

MODIFY
src/server/rest/v1/service/TenantService.ts
src/server/rest/v1/service/TenantService.ts
@@ -198,7 +198,7 @@ export default class TenantService {
content: {
type: UserSettingsContentType.USER,
user: {
- autoAccountActivation: true
+ autoActivateAccountAfterValidation: true
}
},
createdOn: new Date(),

MODIFY
src/server/rest/v1/service/security/SettingSecurity.ts
src/server/rest/v1/service/security/SettingSecurity.ts
@@ -190,7 +190,7 @@ export default class SettingSecurity {
break;
case UserSettingsContentType.USER:
settings.content.user = {
- autoAccountActivation: sanitize(request.content.user.autoAccountActivation)
+ autoActivateAccountAfterValidation: sanitize(request.content.user.autoActivateAccountAfterValidation)
};
break;
}

MODIFY
src/types/Setting.ts
src/types/Setting.ts
@@ -284,5 +284,5 @@ export interface UserSetting extends Setting {
user?: UserSettings;
}
export interface UserSettings {
- autoAccountActivation: boolean;
+ autoActivateAccountAfterValidation: boolean;
}

replaced autoAccountActivation to autoActivateAccountAfterValidation