@eo-sdk/client 8.4.1 → 8.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/eo-framework/settings/change-password/change-password-form/change-password-form.component.d.ts +4 -0
- package/assets/_default/i18n/de.json +3 -0
- package/assets/_default/i18n/en.json +3 -0
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +19 -6
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +2 -2
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
- package/bundles/eo-sdk-client.umd.js +10 -4
- package/bundles/eo-sdk-client.umd.js.map +1 -1
- package/bundles/eo-sdk-client.umd.min.js +1 -1
- package/bundles/eo-sdk-client.umd.min.js.map +1 -1
- package/eo-sdk-client.metadata.json +1 -1
- package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
- package/esm2015/app/eo-framework/settings/change-password/change-password-form/change-password-form.component.js +9 -3
- package/esm2015/projects/eo-sdk/core/lib/model/eo-user.model.js +1 -1
- package/esm2015/projects/eo-sdk/core/lib/service/auth/auth.service.js +2 -2
- package/esm2015/projects/eo-sdk/core/lib/service/user/user.service.js +19 -6
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +19 -6
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
- package/fesm2015/eo-sdk-client.js +10 -4
- package/fesm2015/eo-sdk-client.js.map +1 -1
- package/package.json +2 -2
- package/projects/eo-sdk/core/eo-sdk-client-projects-eo-sdk-core.metadata.json +1 -1
- package/projects/eo-sdk/core/lib/model/eo-user.model.d.ts +4 -0
- package/projects/eo-sdk/core/lib/service/user/user.service.d.ts +7 -2
- package/projects/eo-sdk/core/package.json +1 -1
|
@@ -11,6 +11,10 @@ export declare class ChangePasswordFormComponent {
|
|
|
11
11
|
onFormSumbit: EventEmitter<any>;
|
|
12
12
|
changePasswordForm: FormGroup;
|
|
13
13
|
passwordIsVisible: boolean;
|
|
14
|
+
passwordValidation: {
|
|
15
|
+
type: string;
|
|
16
|
+
amount: any;
|
|
17
|
+
};
|
|
14
18
|
constructor(fb: FormBuilder, userService: UserService, translate: TranslateService, toaster: NotificationsService);
|
|
15
19
|
generateForm(): void;
|
|
16
20
|
newPasswordValidator(current: any, password: any): ValidatorFn;
|
|
@@ -311,6 +311,9 @@
|
|
|
311
311
|
"eo.password.reset.error.password.title": "Passwort konte nicht geändert werden.",
|
|
312
312
|
"eo.password.reset.error.old.password.message": "Das bestehende Passwort ist falsch.",
|
|
313
313
|
"eo.password.reset.error.new.password.message": "Das neue Passwort ist ungültig.",
|
|
314
|
+
"eo.password.reset.error.new.password.short": "Falsches Passwortformat: Geben Sie mindestens {{amount}} Zeichen ein.",
|
|
315
|
+
"eo.password.reset.error.new.password.number": "Falsches Passwortformat: Verwenden Sie mindestens {{amount}} Ziffer(n).",
|
|
316
|
+
"eo.password.reset.error.new.password.specialchars": "Falsches Passwortformat: Verwenden Sie mindestens {{amount}} Sonderzeichen.",
|
|
314
317
|
"eo.password.reset.success": "Das Passwort wurde geändert.",
|
|
315
318
|
"eo.column.config.title": "Spaltenkonfiguration",
|
|
316
319
|
"eo.column.config.action.save": "Speichern",
|
|
@@ -313,6 +313,9 @@
|
|
|
313
313
|
"eo.password.reset.error.password.title": "The password could not be changed.",
|
|
314
314
|
"eo.password.reset.error.old.password.message": "The current password is wrong.",
|
|
315
315
|
"eo.password.reset.error.new.password.message": "The new password is invalid.",
|
|
316
|
+
"eo.password.reset.error.new.password.short": "Wrong format for password: Enter at least {{amount}} characters.",
|
|
317
|
+
"eo.password.reset.error.new.password.number": "Wrong format for password: Enter at least {{amount}} character(s). ",
|
|
318
|
+
"eo.password.reset.error.new.password.specialchars": "Wrong format for password: Enter at least {{amount}} special characters.",
|
|
316
319
|
"eo.password.reset.success": "The password was changed.",
|
|
317
320
|
"eo.column.config.title": "Column configuration",
|
|
318
321
|
"eo.column.config.action.save": "Save",
|
|
@@ -1799,14 +1799,15 @@
|
|
|
1799
1799
|
};
|
|
1800
1800
|
/**
|
|
1801
1801
|
* Set a new current user
|
|
1802
|
-
* @param
|
|
1802
|
+
* @param res The user to be set as current user
|
|
1803
1803
|
*/
|
|
1804
|
-
UserService.prototype.setCurrentUser = function (
|
|
1805
|
-
this.user =
|
|
1804
|
+
UserService.prototype.setCurrentUser = function (res) {
|
|
1805
|
+
this.user = new EoUser(res);
|
|
1806
|
+
this.passwordValidationSettings = res.passwortvalidation;
|
|
1806
1807
|
this.user.setImageBase(this.backend.getServiceBase());
|
|
1807
1808
|
this.backend.setHeader('Accept-Language', this.user.getSchemaLocale());
|
|
1808
1809
|
var languages = this.config.getClientLocales().map(function (lang) { return lang.iso; });
|
|
1809
|
-
var userLang = user.getClientLocale();
|
|
1810
|
+
var userLang = this.user.getClientLocale();
|
|
1810
1811
|
if (languages.indexOf(userLang) === -1) {
|
|
1811
1812
|
userLang = this.config.getDefaultClientLocale();
|
|
1812
1813
|
}
|
|
@@ -1974,7 +1975,19 @@
|
|
|
1974
1975
|
*/
|
|
1975
1976
|
UserService.prototype.refreshCurrentUser = function () {
|
|
1976
1977
|
var _this = this;
|
|
1977
|
-
return this.backend.get(this.USER_FETCH_URI).pipe(operators.map(function (res) { return _this.setCurrentUser(
|
|
1978
|
+
return this.backend.get(this.USER_FETCH_URI).pipe(operators.map(function (res) { return _this.setCurrentUser(res); }));
|
|
1979
|
+
};
|
|
1980
|
+
UserService.prototype.validatePassword = function (password) {
|
|
1981
|
+
if (password.length < this.passwordValidationSettings.minlength) {
|
|
1982
|
+
return { type: 'short', amount: this.passwordValidationSettings.minlength };
|
|
1983
|
+
}
|
|
1984
|
+
if (password.replace(/[^0-9]/g, '').length < this.passwordValidationSettings.minnumber) {
|
|
1985
|
+
return { type: 'number', amount: this.passwordValidationSettings.minnumber };
|
|
1986
|
+
}
|
|
1987
|
+
if (password.replace(/[a-zA-Z0-9ß ]/g, '').length < this.passwordValidationSettings.minspecialchars) {
|
|
1988
|
+
return { type: 'specialchars', amount: this.passwordValidationSettings.minspecialchars };
|
|
1989
|
+
}
|
|
1990
|
+
return { type: 'valid', amount: null };
|
|
1978
1991
|
};
|
|
1979
1992
|
return UserService;
|
|
1980
1993
|
}());
|
|
@@ -3876,7 +3889,7 @@
|
|
|
3876
3889
|
AuthService.prototype.initApp = function (user, sso) {
|
|
3877
3890
|
var currUser = new EoUser(user);
|
|
3878
3891
|
this.backend.setAuthProfile(this.profile);
|
|
3879
|
-
this.userService.setCurrentUser(
|
|
3892
|
+
this.userService.setCurrentUser(user);
|
|
3880
3893
|
var capabilities = this.capabilitiesService.setCapabilities(user.capabilities, sso);
|
|
3881
3894
|
this.systemStatusService.init(this.config.getRaw('systemStatusUpdateInterval'));
|
|
3882
3895
|
// update states
|