@volo/abp.ng.identity 9.1.0 → 9.2.0-rc.1
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/config/components/identity-setting-tabs/identity-lockout/identity-lockout.component.d.ts +22 -0
- package/config/components/identity-setting-tabs/identity-lockout/index.d.ts +1 -0
- package/config/components/identity-setting-tabs/identity-password-policy/identity-password.policy.component.d.ts +22 -0
- package/config/components/identity-setting-tabs/identity-password-policy/index.d.ts +1 -0
- package/config/components/identity-setting-tabs/identity-user-profile/identity-user-profile.component.d.ts +22 -0
- package/config/components/identity-setting-tabs/identity-user-profile/index.d.ts +1 -0
- package/config/components/identity-setting-tabs/{identity-setting.component.d.ts → identity-verification/identity-verification.component.d.ts} +8 -8
- package/config/components/identity-setting-tabs/identity-verification/index.d.ts +1 -0
- package/config/components/identity-setting-tabs/index.d.ts +4 -1
- package/config/identity-config.module.d.ts +14 -11
- package/config/models/identity-settings.d.ts +1 -0
- package/fesm2022/volo-abp.ng.identity-config.mjs +220 -102
- package/fesm2022/volo-abp.ng.identity-config.mjs.map +1 -1
- package/fesm2022/volo-abp.ng.identity-proxy.mjs +4 -0
- package/fesm2022/volo-abp.ng.identity-proxy.mjs.map +1 -1
- package/fesm2022/volo-abp.ng.identity.mjs +43 -16
- package/fesm2022/volo-abp.ng.identity.mjs.map +1 -1
- package/lib/components/security-logs/security-logs.component.d.ts +3 -0
- package/lib/components/users/users.component.d.ts +5 -1
- package/package.json +7 -7
- package/proxy/lib/proxy/identity/models.d.ts +11 -8
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as i2 from '@abp/ng.core';
|
|
2
|
-
import { LocalizationModule,
|
|
2
|
+
import { LocalizationModule, ConfigStateService, SubscriptionService, ListService, AuthService, EnvironmentService, PIPE_TO_LOGIN_FN_KEY, CoreModule, RoutesService, ContentProjectionService, PROJECTION_STRATEGY } from '@abp/ng.core';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, ChangeDetectionStrategy, Component, Injectable, Injector, EventEmitter, Output, NgModule, provideAppInitializer, makeEnvironmentProviders } from '@angular/core';
|
|
5
|
-
import {
|
|
5
|
+
import { finalize, filter, map, switchMap, tap, catchError } from 'rxjs/operators';
|
|
6
6
|
import * as i1$1 from '@ng-bootstrap/ng-bootstrap';
|
|
7
7
|
import { NgbDateAdapter, NgbDropdownModule, NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
|
|
8
8
|
import * as i1 from '@angular/forms';
|
|
9
|
-
import { FormBuilder, ReactiveFormsModule,
|
|
9
|
+
import { FormBuilder, ReactiveFormsModule, UntypedFormBuilder, Validators } from '@angular/forms';
|
|
10
10
|
import * as i3$1 from '@abp/ng.theme.shared';
|
|
11
11
|
import { ToasterService, ConfirmationService, Confirmation, ThemeSharedModule, DateTimeAdapter } from '@abp/ng.theme.shared';
|
|
12
12
|
import { IdentitySettingsService, Settings } from '@volo/abp.ng.identity/proxy';
|
|
13
13
|
import * as i3 from '@ngx-validate/core';
|
|
14
14
|
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i9 from '@angular/common';
|
|
16
16
|
import { from, of, pipe, lastValueFrom, combineLatest, switchMap as switchMap$1 } from 'rxjs';
|
|
17
17
|
import { IdentityLinkUserService, IdentityUserDelegationService } from '@volo/abp.ng.account/public/proxy';
|
|
18
18
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
@@ -49,6 +49,81 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
49
49
|
args: [{ selector: 'abp-identity-session-setting', imports: [ReactiveFormsModule, LocalizationModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h4>{{ 'AbpIdentity::Sessions' | abpLocalization }}</h4>\r\n\r\n<form [formGroup]=\"form\" class=\"abp-md-form\" (ngSubmit)=\"save()\">\r\n <div class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'AbpIdentity::DisplayName:Abp.Identity.PreventConcurrentLogin' | abpLocalization }}\r\n </label>\r\n <select class=\"form-select form-control\" formControlName=\"preventConcurrentLogin\">\r\n @for (setting of sessionSettings; track setting.value) {\r\n <option [ngValue]=\"setting.value\">\r\n {{\r\n 'AbpIdentity::Enum:IdentityProPreventConcurrentLoginBehaviour.' + setting.key\r\n | abpLocalization\r\n }}\r\n </option>\r\n }\r\n </select>\r\n </div>\r\n <div class=\"form-text\">\r\n <p>\r\n {{ 'AbpIdentity::Description:Abp.Identity.PreventConcurrentLogin' | abpLocalization }}\r\n </p>\r\n <ol class=\"list-group\">\r\n <li class=\"list-group-item d-flex justify-content-between align-items-start\">\r\n <div class=\"me-auto\">\r\n <div class=\"fw-bold\">\r\n {{\r\n 'AbpIdentity::Enum:IdentityProPreventConcurrentLoginBehaviour.Disabled'\r\n | abpLocalization\r\n }}\r\n </div>\r\n {{\r\n 'AbpIdentity::Description:IdentityProPreventConcurrentLoginBehaviour.Disabled'\r\n | abpLocalization\r\n }}\r\n </div>\r\n </li>\r\n <li class=\"list-group-item d-flex justify-content-between align-items-start\">\r\n <div class=\"me-auto\">\r\n <div class=\"fw-bold\">\r\n {{\r\n 'AbpIdentity::Enum:IdentityProPreventConcurrentLoginBehaviour.LogoutFromSameTypeDevices'\r\n | abpLocalization\r\n }}\r\n </div>\r\n {{\r\n 'AbpIdentity::Description:IdentityProPreventConcurrentLoginBehaviour.LogoutFromSameTypeDevices'\r\n | abpLocalization\r\n }}\r\n </div>\r\n </li>\r\n <li class=\"list-group-item d-flex justify-content-between align-items-start\">\r\n <div class=\"me-auto\">\r\n <div class=\"fw-bold\">\r\n {{\r\n 'AbpIdentity::Enum:IdentityProPreventConcurrentLoginBehaviour.LogoutFromAllDevices'\r\n | abpLocalization\r\n }}\r\n </div>\r\n {{\r\n 'AbpIdentity::Description:IdentityProPreventConcurrentLoginBehaviour.LogoutFromAllDevices'\r\n | abpLocalization\r\n }}\r\n </div>\r\n </li>\r\n </ol>\r\n </div>\r\n <hr class=\"my-4\" />\r\n <button class=\"btn btn-primary\">\r\n <i class=\"fa fa-save me-1\"></i>\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </button>\r\n</form>\r\n" }]
|
|
50
50
|
}], ctorParameters: () => [] });
|
|
51
51
|
|
|
52
|
+
class IdentityExternalLoginSettingsComponent {
|
|
53
|
+
constructor() {
|
|
54
|
+
this.loading = false;
|
|
55
|
+
this.service = inject(IdentitySettingsService);
|
|
56
|
+
this.toasterService = inject(ToasterService);
|
|
57
|
+
this.configState = inject(ConfigStateService);
|
|
58
|
+
this.fb = inject(UntypedFormBuilder);
|
|
59
|
+
}
|
|
60
|
+
ngOnInit() {
|
|
61
|
+
this.service.getOAuth().subscribe(settings => {
|
|
62
|
+
this.settings = settings;
|
|
63
|
+
this.buildForm();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
submit() {
|
|
67
|
+
if (this.form.invalid) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.loading = true;
|
|
71
|
+
this.service
|
|
72
|
+
.updateOAuth(this.form.value)
|
|
73
|
+
.pipe(finalize(() => (this.loading = false)))
|
|
74
|
+
.subscribe(() => {
|
|
75
|
+
this.toasterService.success('AbpUi::SavedSuccessfully', null);
|
|
76
|
+
this.configState.refreshAppState().subscribe();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
buildForm() {
|
|
80
|
+
this.form = this.fb.group({
|
|
81
|
+
enableOAuthLogin: [this.settings.enableOAuthLogin, []],
|
|
82
|
+
clientId: [this.settings.clientId, [Validators.required]],
|
|
83
|
+
clientSecret: [this.settings.clientSecret, []],
|
|
84
|
+
authority: [this.settings.authority, [Validators.required]],
|
|
85
|
+
scope: [this.settings.scope, []],
|
|
86
|
+
requireHttpsMetadata: [this.settings.requireHttpsMetadata, []],
|
|
87
|
+
validateIssuerName: [this.settings.validateIssuerName, []],
|
|
88
|
+
validateEndpoints: [this.settings.validateEndpoints, []],
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityExternalLoginSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
92
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentityExternalLoginSettingsComponent, isStandalone: false, selector: "abp-external-login-settings", ngImport: i0, template: "@if (settings) {\r\n <h4>{{ 'AbpIdentity::OAuthLoginSettings' | abpLocalization }}</h4>\r\n\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"enable-oauth-login\"\r\n class=\"form-check-input\"\r\n formControlName=\"enableOAuthLogin\"\r\n autofocus\r\n /><label class=\"form-check-label\" for=\"enable-oauth-login\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.EnableOAuthLogin' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ClientId' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"clientId\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ClientSecret' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"clientSecret\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Authority' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"authority\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Scope' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"scope\" />\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"require-https-metadata\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireHttpsMetadata\"\r\n /><label class=\"form-check-label\" for=\"require-https-metadata\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.RequireHttpsMetadata' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"validate-endpoints\"\r\n class=\"form-check-input\"\r\n formControlName=\"validateEndpoints\"\r\n /><label class=\"form-check-label\" for=\"validate-endpoints\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ValidateEndpoints' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"validate-issuer-name\"\r\n class=\"form-check-input\"\r\n formControlName=\"validateIssuerName\"\r\n /><label class=\"form-check-label\" for=\"validate-issuer-name\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ValidateIssuerName' | abpLocalization\r\n }}</label>\r\n </div>\r\n <hr class=\"my-3\" />\r\n\r\n <div>\r\n <abp-button buttonType=\"submit\" iconClass=\"fa fa-save\" [loading]=\"loading\">{{\r\n 'AbpAccount::Save' | abpLocalization\r\n }}</abp-button>\r\n </div>\r\n </form>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
93
|
+
}
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityExternalLoginSettingsComponent, decorators: [{
|
|
95
|
+
type: Component,
|
|
96
|
+
args: [{ standalone: false, selector: 'abp-external-login-settings', template: "@if (settings) {\r\n <h4>{{ 'AbpIdentity::OAuthLoginSettings' | abpLocalization }}</h4>\r\n\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"enable-oauth-login\"\r\n class=\"form-check-input\"\r\n formControlName=\"enableOAuthLogin\"\r\n autofocus\r\n /><label class=\"form-check-label\" for=\"enable-oauth-login\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.EnableOAuthLogin' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ClientId' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"clientId\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ClientSecret' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"clientSecret\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Authority' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"authority\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Scope' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"scope\" />\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"require-https-metadata\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireHttpsMetadata\"\r\n /><label class=\"form-check-label\" for=\"require-https-metadata\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.RequireHttpsMetadata' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"validate-endpoints\"\r\n class=\"form-check-input\"\r\n formControlName=\"validateEndpoints\"\r\n /><label class=\"form-check-label\" for=\"validate-endpoints\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ValidateEndpoints' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"validate-issuer-name\"\r\n class=\"form-check-input\"\r\n formControlName=\"validateIssuerName\"\r\n /><label class=\"form-check-label\" for=\"validate-issuer-name\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.ValidateIssuerName' | abpLocalization\r\n }}</label>\r\n </div>\r\n <hr class=\"my-3\" />\r\n\r\n <div>\r\n <abp-button buttonType=\"submit\" iconClass=\"fa fa-save\" [loading]=\"loading\">{{\r\n 'AbpAccount::Save' | abpLocalization\r\n }}</abp-button>\r\n </div>\r\n </form>\r\n}\r\n" }]
|
|
97
|
+
}] });
|
|
98
|
+
|
|
99
|
+
class IdentityLdapSettingsComponent {
|
|
100
|
+
constructor() {
|
|
101
|
+
this.loading = false;
|
|
102
|
+
this.service = inject(IdentitySettingsService);
|
|
103
|
+
this.toasterService = inject(ToasterService);
|
|
104
|
+
this.configState = inject(ConfigStateService);
|
|
105
|
+
}
|
|
106
|
+
ngOnInit() {
|
|
107
|
+
this.service.getLdap().subscribe(settings => (this.settings = settings));
|
|
108
|
+
}
|
|
109
|
+
submit(settings) {
|
|
110
|
+
this.loading = true;
|
|
111
|
+
this.service
|
|
112
|
+
.updateLdap(settings)
|
|
113
|
+
.pipe(finalize(() => (this.loading = false)))
|
|
114
|
+
.subscribe(() => {
|
|
115
|
+
this.toasterService.success('AbpUi::SavedSuccessfully', null);
|
|
116
|
+
this.configState.refreshAppState().subscribe();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityLdapSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
120
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentityLdapSettingsComponent, isStandalone: false, selector: "abp-ldap-login-settings", ngImport: i0, template: "@if (settings) {\r\n <h4>{{ 'AbpIdentity::LdapLoginSettings' | abpLocalization }}</h4>\r\n <div id=\"ldap-login-settings\" (keyup.enter)=\"submit(settings)\">\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"enable-ldap-login\"\r\n class=\"form-check-input\"\r\n [(ngModel)]=\"settings.enableLdapLogin\"\r\n autofocus\r\n /><label class=\"form-check-label\" for=\"enable-ldap-login\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.EnableLdapLogin' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"ldaps\"\r\n class=\"form-check-input\"\r\n [(ngModel)]=\"settings.ldaps\"\r\n autofocus\r\n /><label class=\"form-check-label\" for=\"ldaps\">{{\r\n 'AbpIdentity::DisplayName:Abp.Ldap.Ldaps' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.ServerHost' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapServerHost\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.ServerPort' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapServerPort\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.BaseDc' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapBaseDc\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.Domain' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapDomain\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.UserName' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapUserName\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.Password' | abpLocalization\r\n }}</label>\r\n <input\r\n type=\"password\"\r\n class=\"form-control\"\r\n placeholder=\"{{ 'AbpIdentity::LdapPasswordPlaceholder' | abpLocalization }}\"\r\n [(ngModel)]=\"settings.ldapPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <hr class=\"my-3\" />\r\n\r\n <div>\r\n <abp-button (click)=\"submit(settings)\" iconClass=\"fa fa-save\" [loading]=\"loading\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
121
|
+
}
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityLdapSettingsComponent, decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{ standalone: false, selector: 'abp-ldap-login-settings', template: "@if (settings) {\r\n <h4>{{ 'AbpIdentity::LdapLoginSettings' | abpLocalization }}</h4>\r\n <div id=\"ldap-login-settings\" (keyup.enter)=\"submit(settings)\">\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"enable-ldap-login\"\r\n class=\"form-check-input\"\r\n [(ngModel)]=\"settings.enableLdapLogin\"\r\n autofocus\r\n /><label class=\"form-check-label\" for=\"enable-ldap-login\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.EnableLdapLogin' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"ldaps\"\r\n class=\"form-check-input\"\r\n [(ngModel)]=\"settings.ldaps\"\r\n autofocus\r\n /><label class=\"form-check-label\" for=\"ldaps\">{{\r\n 'AbpIdentity::DisplayName:Abp.Ldap.Ldaps' | abpLocalization\r\n }}</label>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.ServerHost' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapServerHost\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.ServerPort' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapServerPort\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.BaseDc' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapBaseDc\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.Domain' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapDomain\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.UserName' | abpLocalization\r\n }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"settings.ldapUserName\" />\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{\r\n 'AbpLdap::DisplayName:Abp.Ldap.Password' | abpLocalization\r\n }}</label>\r\n <input\r\n type=\"password\"\r\n class=\"form-control\"\r\n placeholder=\"{{ 'AbpIdentity::LdapPasswordPlaceholder' | abpLocalization }}\"\r\n [(ngModel)]=\"settings.ldapPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <hr class=\"my-3\" />\r\n\r\n <div>\r\n <abp-button (click)=\"submit(settings)\" iconClass=\"fa fa-save\" [loading]=\"loading\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </div>\r\n}\r\n" }]
|
|
125
|
+
}] });
|
|
126
|
+
|
|
52
127
|
class IdentityConfigService {
|
|
53
128
|
constructor(restService) {
|
|
54
129
|
this.restService = restService;
|
|
@@ -77,16 +152,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
77
152
|
}]
|
|
78
153
|
}], ctorParameters: () => [{ type: i2.RestService }] });
|
|
79
154
|
|
|
80
|
-
const { required, max, min } = Validators;
|
|
81
|
-
class
|
|
155
|
+
const { required: required$1, max, min } = Validators;
|
|
156
|
+
class IdentityPasswordPolicyComponent {
|
|
82
157
|
constructor() {
|
|
83
158
|
this.settings = {};
|
|
84
|
-
this.doNotRequireConfirmedPhoneNumber = () => {
|
|
85
|
-
this.form.get('signIn.requireConfirmedPhoneNumber').setValue(false);
|
|
86
|
-
};
|
|
87
|
-
this.enablePhoneNumberConfirmation = () => {
|
|
88
|
-
this.form.get('signIn.enablePhoneNumberConfirmation').setValue(true);
|
|
89
|
-
};
|
|
90
159
|
this.identityConfigService = inject(IdentityConfigService);
|
|
91
160
|
this.toaster = inject(ToasterService);
|
|
92
161
|
this.fb = inject(UntypedFormBuilder);
|
|
@@ -97,144 +166,184 @@ class IdentitySettingComponent {
|
|
|
97
166
|
this.identityConfigService.getSettings().subscribe(settings => {
|
|
98
167
|
this.settings = settings;
|
|
99
168
|
this.buildForm();
|
|
100
|
-
this.syncConfirmationOptions();
|
|
101
169
|
});
|
|
102
170
|
}
|
|
103
171
|
buildForm() {
|
|
104
172
|
const passwordSettings = this.settings?.password || {};
|
|
105
|
-
|
|
106
|
-
requiredLength: [passwordSettings.requiredLength, [required, max(32), min(2)]],
|
|
107
|
-
requiredUniqueChars: [passwordSettings.requiredUniqueChars, [required, max(32), min(1)]],
|
|
173
|
+
this.identityPasswordPolicyForm = this.fb.group({
|
|
174
|
+
requiredLength: [passwordSettings.requiredLength, [required$1, max(32), min(2)]],
|
|
175
|
+
requiredUniqueChars: [passwordSettings.requiredUniqueChars, [required$1, max(32), min(1)]],
|
|
108
176
|
requireNonAlphanumeric: passwordSettings.requireNonAlphanumeric,
|
|
109
177
|
requireLowercase: passwordSettings.requireLowercase,
|
|
110
178
|
requireUppercase: passwordSettings.requireUppercase,
|
|
111
179
|
requireDigit: passwordSettings.requireDigit,
|
|
112
180
|
forceUsersToPeriodicallyChangePassword: passwordSettings.forceUsersToPeriodicallyChangePassword,
|
|
113
|
-
passwordChangePeriodDays: [passwordSettings.passwordChangePeriodDays, [required, min(0)]],
|
|
181
|
+
passwordChangePeriodDays: [passwordSettings.passwordChangePeriodDays, [required$1, min(0)]],
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
submit() {
|
|
185
|
+
if (this.loading || this.identityPasswordPolicyForm?.invalid)
|
|
186
|
+
return;
|
|
187
|
+
this.loading = true;
|
|
188
|
+
this.identityConfigService
|
|
189
|
+
.updateSettings({ ...this.settings, password: this.identityPasswordPolicyForm.value })
|
|
190
|
+
.pipe(finalize(() => {
|
|
191
|
+
this.loading = false;
|
|
192
|
+
this.configState.refreshAppState().subscribe();
|
|
193
|
+
}))
|
|
194
|
+
.subscribe(() => this.toaster.success('AbpUi::SavedSuccessfully', null));
|
|
195
|
+
}
|
|
196
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityPasswordPolicyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
197
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentityPasswordPolicyComponent, isStandalone: false, selector: "abp-identity-password-policy", providers: [SubscriptionService], ngImport: i0, template: "@if (identityPasswordPolicyForm) {\r\n <form id=\"identityPasswordPolicyForm\" [formGroup]=\"identityPasswordPolicyForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::PasswordStrengthSettings' | abpLocalization }}</h4>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredLength\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredLength\"\r\n name=\"Password.RequiredLength\"\r\n class=\"form-control\"\r\n formControlName=\"requiredLength\"\r\n min=\"2\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredUniqueChars\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredUniqueChars\"\r\n name=\"Password.RequiredUniqueChars\"\r\n class=\"form-control\"\r\n formControlName=\"requiredUniqueChars\"\r\n min=\"0\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireNonAlphanumeric\"\r\n name=\"Password.RequireNonAlphanumeric\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireNonAlphanumeric\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireNonAlphanumeric\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireLowercase\"\r\n name=\"Password.RequireLowercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireLowercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireLowercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireUppercase\"\r\n name=\"Password.RequireUppercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireUppercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireUppercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireDigit\"\r\n name=\"Password.RequireDigit\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireDigit\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireDigit\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <hr class=\"my-4\" />\r\n <h4>{{ 'AbpIdentity::PasswordRenewingSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_ForceUsersToPeriodicallyChangePassword\"\r\n name=\"Password.ForceUsersToPeriodicallyChangePassword\"\r\n class=\"form-check-input\"\r\n formControlName=\"forceUsersToPeriodicallyChangePassword\"\r\n />\r\n <label class=\"form-check-label\" for=\"Password_ForceUsersToPeriodicallyChangePassword\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</label>\r\n <br />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_PasswordChangePeriodDays\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_PasswordChangePeriodDays\"\r\n name=\"Password.PasswordChangePeriodDays\"\r\n class=\"form-control\"\r\n formControlName=\"passwordChangePeriodDays\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
198
|
+
}
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityPasswordPolicyComponent, decorators: [{
|
|
200
|
+
type: Component,
|
|
201
|
+
args: [{ standalone: false, selector: 'abp-identity-password-policy', providers: [SubscriptionService], template: "@if (identityPasswordPolicyForm) {\r\n <form id=\"identityPasswordPolicyForm\" [formGroup]=\"identityPasswordPolicyForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::PasswordStrengthSettings' | abpLocalization }}</h4>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredLength\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredLength\"\r\n name=\"Password.RequiredLength\"\r\n class=\"form-control\"\r\n formControlName=\"requiredLength\"\r\n min=\"2\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredUniqueChars\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredUniqueChars\"\r\n name=\"Password.RequiredUniqueChars\"\r\n class=\"form-control\"\r\n formControlName=\"requiredUniqueChars\"\r\n min=\"0\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireNonAlphanumeric\"\r\n name=\"Password.RequireNonAlphanumeric\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireNonAlphanumeric\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireNonAlphanumeric\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireLowercase\"\r\n name=\"Password.RequireLowercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireLowercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireLowercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireUppercase\"\r\n name=\"Password.RequireUppercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireUppercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireUppercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireDigit\"\r\n name=\"Password.RequireDigit\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireDigit\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireDigit\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <hr class=\"my-4\" />\r\n <h4>{{ 'AbpIdentity::PasswordRenewingSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_ForceUsersToPeriodicallyChangePassword\"\r\n name=\"Password.ForceUsersToPeriodicallyChangePassword\"\r\n class=\"form-check-input\"\r\n formControlName=\"forceUsersToPeriodicallyChangePassword\"\r\n />\r\n <label class=\"form-check-label\" for=\"Password_ForceUsersToPeriodicallyChangePassword\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</label>\r\n <br />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_PasswordChangePeriodDays\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_PasswordChangePeriodDays\"\r\n name=\"Password.PasswordChangePeriodDays\"\r\n class=\"form-control\"\r\n formControlName=\"passwordChangePeriodDays\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n" }]
|
|
202
|
+
}] });
|
|
203
|
+
|
|
204
|
+
const { required } = Validators;
|
|
205
|
+
class IdentityLockoutComponent {
|
|
206
|
+
constructor() {
|
|
207
|
+
this.settings = {};
|
|
208
|
+
this.identityConfigService = inject(IdentityConfigService);
|
|
209
|
+
this.toaster = inject(ToasterService);
|
|
210
|
+
this.fb = inject(UntypedFormBuilder);
|
|
211
|
+
this.subscription = inject(SubscriptionService);
|
|
212
|
+
this.configState = inject(ConfigStateService);
|
|
213
|
+
}
|
|
214
|
+
ngOnInit() {
|
|
215
|
+
this.identityConfigService.getSettings().subscribe(settings => {
|
|
216
|
+
this.settings = settings;
|
|
217
|
+
this.buildForm();
|
|
114
218
|
});
|
|
219
|
+
}
|
|
220
|
+
buildForm() {
|
|
115
221
|
const lockoutSettings = this.settings?.lockout || {};
|
|
116
|
-
|
|
222
|
+
this.identityLockoutForm = this.fb.group({
|
|
117
223
|
allowedForNewUsers: lockoutSettings.allowedForNewUsers,
|
|
118
224
|
lockoutDuration: [lockoutSettings.lockoutDuration, [required]],
|
|
119
225
|
maxFailedAccessAttempts: [lockoutSettings.maxFailedAccessAttempts, [required]],
|
|
120
226
|
});
|
|
121
|
-
const signInSettings = this.settings?.signIn || {};
|
|
122
|
-
const signIn = this.fb.group({
|
|
123
|
-
requireConfirmedEmail: signInSettings.requireConfirmedEmail,
|
|
124
|
-
enablePhoneNumberConfirmation: signInSettings.enablePhoneNumberConfirmation,
|
|
125
|
-
requireConfirmedPhoneNumber: signInSettings.requireConfirmedPhoneNumber,
|
|
126
|
-
});
|
|
127
|
-
const userSettings = this.settings?.user || {};
|
|
128
|
-
const user = this.fb.group({
|
|
129
|
-
isUserNameUpdateEnabled: userSettings.isUserNameUpdateEnabled,
|
|
130
|
-
isEmailUpdateEnabled: userSettings.isEmailUpdateEnabled,
|
|
131
|
-
});
|
|
132
|
-
this.form = this.fb.group({
|
|
133
|
-
password,
|
|
134
|
-
lockout,
|
|
135
|
-
signIn,
|
|
136
|
-
user,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
syncConfirmationOptions() {
|
|
140
|
-
this.subscription.addOne(this.form.get('signIn.requireConfirmedPhoneNumber').valueChanges.pipe(filter(Boolean)), this.enablePhoneNumberConfirmation);
|
|
141
|
-
this.subscription.addOne(this.form
|
|
142
|
-
.get('signIn.enablePhoneNumberConfirmation')
|
|
143
|
-
.valueChanges.pipe(filter(value => !value)), this.doNotRequireConfirmedPhoneNumber);
|
|
144
227
|
}
|
|
145
228
|
submit() {
|
|
146
|
-
if (this.loading || this.
|
|
229
|
+
if (this.loading || this.identityLockoutForm?.invalid)
|
|
147
230
|
return;
|
|
148
231
|
this.loading = true;
|
|
149
232
|
this.identityConfigService
|
|
150
|
-
.updateSettings(this.
|
|
233
|
+
.updateSettings({ ...this.settings, lockout: this.identityLockoutForm.value })
|
|
151
234
|
.pipe(finalize(() => {
|
|
152
235
|
this.loading = false;
|
|
153
236
|
this.configState.refreshAppState().subscribe();
|
|
154
237
|
}))
|
|
155
238
|
.subscribe(() => this.toaster.success('AbpUi::SavedSuccessfully', null));
|
|
156
239
|
}
|
|
157
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
158
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentitySettingComponent, isStandalone: false, selector: "abp-identity-setting", providers: [SubscriptionService], ngImport: i0, template: "@if (form) {\r\n <form id=\"IdentitySettingsForm\" [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div formGroupName=\"password\">\r\n <h4>{{ 'AbpIdentity::PasswordSettings' | abpLocalization }}</h4>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredLength\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredLength\"\r\n name=\"Password.RequiredLength\"\r\n class=\"form-control\"\r\n formControlName=\"requiredLength\"\r\n min=\"2\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredUniqueChars\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredUniqueChars\"\r\n name=\"Password.RequiredUniqueChars\"\r\n class=\"form-control\"\r\n formControlName=\"requiredUniqueChars\"\r\n min=\"0\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireNonAlphanumeric\"\r\n name=\"Password.RequireNonAlphanumeric\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireNonAlphanumeric\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireNonAlphanumeric\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireLowercase\"\r\n name=\"Password.RequireLowercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireLowercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireLowercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireUppercase\"\r\n name=\"Password.RequireUppercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireUppercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireUppercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireDigit\"\r\n name=\"Password.RequireDigit\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireDigit\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireDigit\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <hr class=\"my-4\" />\r\n <h4>{{ 'AbpIdentity::PasswordRenewingSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_ForceUsersToPeriodicallyChangePassword\"\r\n name=\"Password.ForceUsersToPeriodicallyChangePassword\"\r\n class=\"form-check-input\"\r\n formControlName=\"forceUsersToPeriodicallyChangePassword\"\r\n />\r\n <label class=\"form-check-label\" for=\"Password_ForceUsersToPeriodicallyChangePassword\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</label>\r\n <br />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_PasswordChangePeriodDays\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_PasswordChangePeriodDays\"\r\n name=\"Password.PasswordChangePeriodDays\"\r\n class=\"form-control\"\r\n formControlName=\"passwordChangePeriodDays\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-4\" />\r\n <div formGroupName=\"lockout\">\r\n <h4>{{ 'AbpIdentity::LockoutSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Lockout_AllowedForNewUsers\"\r\n name=\"Lockout.AllowedForNewUsers\"\r\n class=\"form-check-input\"\r\n formControlName=\"allowedForNewUsers\"\r\n /><label class=\"form-check-label\" for=\"Lockout_AllowedForNewUsers\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_LockoutDuration\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_LockoutDuration\"\r\n name=\"Lockout.LockoutDuration\"\r\n class=\"form-control\"\r\n formControlName=\"lockoutDuration\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_MaxFailedAccessAttempts\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_MaxFailedAccessAttempts\"\r\n name=\"Lockout.MaxFailedAccessAttempts\"\r\n class=\"form-control\"\r\n formControlName=\"maxFailedAccessAttempts\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-4\" />\r\n <div formGroupName=\"signIn\">\r\n <h4>{{ 'AbpIdentity::SignInSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedEmail\"\r\n name=\"SignIn.RequireConfirmedEmail\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedEmail\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedEmail\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_EnablePhoneNumberConfirmation\"\r\n name=\"SignIn.EnablePhoneNumberConfirmation\"\r\n class=\"form-check-input\"\r\n formControlName=\"enablePhoneNumberConfirmation\"\r\n /><label class=\"form-check-label\" for=\"SignIn_EnablePhoneNumberConfirmation\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedPhoneNumber\"\r\n name=\"SignIn.RequireConfirmedPhoneNumber\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedPhoneNumber\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedPhoneNumber\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-4\" />\r\n <div formGroupName=\"user\">\r\n <h4>{{ 'AbpIdentity::UserSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsEmailUpdateEnabled\"\r\n name=\"User.IsEmailUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isEmailUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsEmailUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsUserNameUpdateEnabled\"\r\n name=\"User.IsUserNameUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isUserNameUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsUserNameUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-3\" />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityLockoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
241
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentityLockoutComponent, isStandalone: false, selector: "abp-identity-lockout", providers: [SubscriptionService], ngImport: i0, template: "@if(identityLockoutForm) {\r\n <form id=\"identityLockoutForm\" [formGroup]=\"identityLockoutForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::LockoutSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Lockout_AllowedForNewUsers\"\r\n name=\"Lockout.AllowedForNewUsers\"\r\n class=\"form-check-input\"\r\n formControlName=\"allowedForNewUsers\"\r\n /><label class=\"form-check-label\" for=\"Lockout_AllowedForNewUsers\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_LockoutDuration\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_LockoutDuration\"\r\n name=\"Lockout.LockoutDuration\"\r\n class=\"form-control\"\r\n formControlName=\"lockoutDuration\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_MaxFailedAccessAttempts\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_MaxFailedAccessAttempts\"\r\n name=\"Lockout.MaxFailedAccessAttempts\"\r\n class=\"form-control\"\r\n formControlName=\"maxFailedAccessAttempts\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
159
242
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityLockoutComponent, decorators: [{
|
|
161
244
|
type: Component,
|
|
162
|
-
args: [{ standalone: false, selector: 'abp-identity-setting', providers: [SubscriptionService], template: "@if (form) {\r\n <form id=\"IdentitySettingsForm\" [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div formGroupName=\"password\">\r\n <h4>{{ 'AbpIdentity::PasswordSettings' | abpLocalization }}</h4>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredLength\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredLength\"\r\n name=\"Password.RequiredLength\"\r\n class=\"form-control\"\r\n formControlName=\"requiredLength\"\r\n min=\"2\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredLength' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_RequiredUniqueChars\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_RequiredUniqueChars\"\r\n name=\"Password.RequiredUniqueChars\"\r\n class=\"form-control\"\r\n formControlName=\"requiredUniqueChars\"\r\n min=\"0\"\r\n max=\"32\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequiredUniqueChars' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireNonAlphanumeric\"\r\n name=\"Password.RequireNonAlphanumeric\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireNonAlphanumeric\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireNonAlphanumeric\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireNonAlphanumeric'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireLowercase\"\r\n name=\"Password.RequireLowercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireLowercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireLowercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireLowercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireUppercase\"\r\n name=\"Password.RequireUppercase\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireUppercase\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireUppercase\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireUppercase' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_RequireDigit\"\r\n name=\"Password.RequireDigit\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireDigit\"\r\n /><label class=\"form-check-label\" for=\"Password_RequireDigit\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.RequireDigit' | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <hr class=\"my-4\" />\r\n <h4>{{ 'AbpIdentity::PasswordRenewingSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Password_ForceUsersToPeriodicallyChangePassword\"\r\n name=\"Password.ForceUsersToPeriodicallyChangePassword\"\r\n class=\"form-check-input\"\r\n formControlName=\"forceUsersToPeriodicallyChangePassword\"\r\n />\r\n <label class=\"form-check-label\" for=\"Password_ForceUsersToPeriodicallyChangePassword\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</label>\r\n <br />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Password_PasswordChangePeriodDays\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Password_PasswordChangePeriodDays\"\r\n name=\"Password.PasswordChangePeriodDays\"\r\n class=\"form-control\"\r\n formControlName=\"passwordChangePeriodDays\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Password.PasswordChangePeriodDays'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-4\" />\r\n <div formGroupName=\"lockout\">\r\n <h4>{{ 'AbpIdentity::LockoutSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Lockout_AllowedForNewUsers\"\r\n name=\"Lockout.AllowedForNewUsers\"\r\n class=\"form-check-input\"\r\n formControlName=\"allowedForNewUsers\"\r\n /><label class=\"form-check-label\" for=\"Lockout_AllowedForNewUsers\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_LockoutDuration\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_LockoutDuration\"\r\n name=\"Lockout.LockoutDuration\"\r\n class=\"form-control\"\r\n formControlName=\"lockoutDuration\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_MaxFailedAccessAttempts\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_MaxFailedAccessAttempts\"\r\n name=\"Lockout.MaxFailedAccessAttempts\"\r\n class=\"form-control\"\r\n formControlName=\"maxFailedAccessAttempts\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-4\" />\r\n <div formGroupName=\"signIn\">\r\n <h4>{{ 'AbpIdentity::SignInSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedEmail\"\r\n name=\"SignIn.RequireConfirmedEmail\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedEmail\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedEmail\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_EnablePhoneNumberConfirmation\"\r\n name=\"SignIn.EnablePhoneNumberConfirmation\"\r\n class=\"form-check-input\"\r\n formControlName=\"enablePhoneNumberConfirmation\"\r\n /><label class=\"form-check-label\" for=\"SignIn_EnablePhoneNumberConfirmation\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedPhoneNumber\"\r\n name=\"SignIn.RequireConfirmedPhoneNumber\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedPhoneNumber\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedPhoneNumber\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-4\" />\r\n <div formGroupName=\"user\">\r\n <h4>{{ 'AbpIdentity::UserSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsEmailUpdateEnabled\"\r\n name=\"User.IsEmailUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isEmailUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsEmailUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsUserNameUpdateEnabled\"\r\n name=\"User.IsUserNameUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isUserNameUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsUserNameUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</label>\r\n \r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n </div>\r\n <hr class=\"my-3\" />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n}\r\n" }]
|
|
245
|
+
args: [{ standalone: false, selector: 'abp-identity-lockout', providers: [SubscriptionService], template: "@if(identityLockoutForm) {\r\n <form id=\"identityLockoutForm\" [formGroup]=\"identityLockoutForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::LockoutSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"Lockout_AllowedForNewUsers\"\r\n name=\"Lockout.AllowedForNewUsers\"\r\n class=\"form-check-input\"\r\n formControlName=\"allowedForNewUsers\"\r\n /><label class=\"form-check-label\" for=\"Lockout_AllowedForNewUsers\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.AllowedForNewUsers' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_LockoutDuration\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_LockoutDuration\"\r\n name=\"Lockout.LockoutDuration\"\r\n class=\"form-control\"\r\n formControlName=\"lockoutDuration\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.LockoutDuration' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"Lockout_MaxFailedAccessAttempts\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</label\r\n ><input\r\n type=\"number\"\r\n id=\"Lockout_MaxFailedAccessAttempts\"\r\n name=\"Lockout.MaxFailedAccessAttempts\"\r\n class=\"form-control\"\r\n formControlName=\"maxFailedAccessAttempts\"\r\n />\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.Lockout.MaxFailedAccessAttempts'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n" }]
|
|
163
246
|
}] });
|
|
164
247
|
|
|
165
|
-
class
|
|
248
|
+
class IdentityVerificationComponent {
|
|
166
249
|
constructor() {
|
|
167
|
-
this.
|
|
168
|
-
this.
|
|
169
|
-
|
|
170
|
-
|
|
250
|
+
this.settings = {};
|
|
251
|
+
this.doNotRequireConfirmedPhoneNumber = () => {
|
|
252
|
+
this.identityVerificationForm.get('requireConfirmedPhoneNumber').setValue(false);
|
|
253
|
+
};
|
|
254
|
+
this.enablePhoneNumberConfirmation = () => {
|
|
255
|
+
this.identityVerificationForm.get('enablePhoneNumberConfirmation').setValue(true);
|
|
256
|
+
};
|
|
257
|
+
this.identityConfigService = inject(IdentityConfigService);
|
|
258
|
+
this.toaster = inject(ToasterService);
|
|
171
259
|
this.fb = inject(UntypedFormBuilder);
|
|
260
|
+
this.subscription = inject(SubscriptionService);
|
|
261
|
+
this.configState = inject(ConfigStateService);
|
|
172
262
|
}
|
|
173
263
|
ngOnInit() {
|
|
174
|
-
this.
|
|
264
|
+
this.identityConfigService.getSettings().subscribe(settings => {
|
|
175
265
|
this.settings = settings;
|
|
176
266
|
this.buildForm();
|
|
267
|
+
this.syncConfirmationOptions();
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
buildForm() {
|
|
271
|
+
const signInSettings = this.settings?.signIn || {};
|
|
272
|
+
this.identityVerificationForm = this.fb.group({
|
|
273
|
+
requireConfirmedEmail: signInSettings.requireConfirmedEmail,
|
|
274
|
+
enablePhoneNumberConfirmation: signInSettings.enablePhoneNumberConfirmation,
|
|
275
|
+
requireConfirmedPhoneNumber: signInSettings.requireConfirmedPhoneNumber,
|
|
276
|
+
requireEmailVerificationToRegister: signInSettings.requireEmailVerificationToRegister,
|
|
177
277
|
});
|
|
178
278
|
}
|
|
279
|
+
syncConfirmationOptions() {
|
|
280
|
+
this.subscription.addOne(this.identityVerificationForm
|
|
281
|
+
.get('requireConfirmedPhoneNumber')
|
|
282
|
+
.valueChanges.pipe(filter(Boolean)), this.enablePhoneNumberConfirmation);
|
|
283
|
+
this.subscription.addOne(this.identityVerificationForm
|
|
284
|
+
.get('enablePhoneNumberConfirmation')
|
|
285
|
+
.valueChanges.pipe(filter(value => !value)), this.doNotRequireConfirmedPhoneNumber);
|
|
286
|
+
}
|
|
179
287
|
submit() {
|
|
180
|
-
if (this.
|
|
288
|
+
if (this.loading || this.identityVerificationForm?.invalid)
|
|
181
289
|
return;
|
|
182
|
-
}
|
|
183
290
|
this.loading = true;
|
|
184
|
-
this.
|
|
185
|
-
.
|
|
186
|
-
.pipe(finalize(() =>
|
|
187
|
-
.
|
|
188
|
-
this.toasterService.success('AbpUi::SavedSuccessfully', null);
|
|
291
|
+
this.identityConfigService
|
|
292
|
+
.updateSettings({ ...this.settings, signIn: this.identityVerificationForm.value })
|
|
293
|
+
.pipe(finalize(() => {
|
|
294
|
+
this.loading = false;
|
|
189
295
|
this.configState.refreshAppState().subscribe();
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
buildForm() {
|
|
193
|
-
this.form = this.fb.group({
|
|
194
|
-
enableOAuthLogin: [this.settings.enableOAuthLogin, []],
|
|
195
|
-
clientId: [this.settings.clientId, [Validators.required]],
|
|
196
|
-
clientSecret: [this.settings.clientSecret, []],
|
|
197
|
-
authority: [this.settings.authority, [Validators.required]],
|
|
198
|
-
scope: [this.settings.scope, []],
|
|
199
|
-
requireHttpsMetadata: [this.settings.requireHttpsMetadata, []],
|
|
200
|
-
validateIssuerName: [this.settings.validateIssuerName, []],
|
|
201
|
-
validateEndpoints: [this.settings.validateEndpoints, []],
|
|
202
|
-
});
|
|
296
|
+
}))
|
|
297
|
+
.subscribe(() => this.toaster.success('AbpUi::SavedSuccessfully', null));
|
|
203
298
|
}
|
|
204
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
205
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type:
|
|
299
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityVerificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentityVerificationComponent, isStandalone: false, selector: "abp-identity-verification", providers: [SubscriptionService], ngImport: i0, template: "@if(identityVerificationForm) {\r\n <form id=\"identityVerificationForm\" [formGroup]=\"identityVerificationForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::SignInSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedEmail\"\r\n name=\"SignIn.RequireConfirmedEmail\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedEmail\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedEmail\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireEmailVerificationToRegister\"\r\n name=\"SignIn.RequireEmailVerificationToRegister\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireEmailVerificationToRegister\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireEmailVerificationToRegister\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireEmailVerificationToRegister'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireEmailVerificationToRegister'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_EnablePhoneNumberConfirmation\"\r\n name=\"SignIn.EnablePhoneNumberConfirmation\"\r\n class=\"form-check-input\"\r\n formControlName=\"enablePhoneNumberConfirmation\"\r\n /><label class=\"form-check-label\" for=\"SignIn_EnablePhoneNumberConfirmation\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedPhoneNumber\"\r\n name=\"SignIn.RequireConfirmedPhoneNumber\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedPhoneNumber\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedPhoneNumber\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
206
301
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityVerificationComponent, decorators: [{
|
|
208
303
|
type: Component,
|
|
209
|
-
args: [{ standalone: false, selector: 'abp-
|
|
304
|
+
args: [{ standalone: false, selector: 'abp-identity-verification', providers: [SubscriptionService], template: "@if(identityVerificationForm) {\r\n <form id=\"identityVerificationForm\" [formGroup]=\"identityVerificationForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::SignInSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedEmail\"\r\n name=\"SignIn.RequireConfirmedEmail\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedEmail\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedEmail\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedEmail' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireEmailVerificationToRegister\"\r\n name=\"SignIn.RequireEmailVerificationToRegister\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireEmailVerificationToRegister\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireEmailVerificationToRegister\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireEmailVerificationToRegister'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireEmailVerificationToRegister'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_EnablePhoneNumberConfirmation\"\r\n name=\"SignIn.EnablePhoneNumberConfirmation\"\r\n class=\"form-check-input\"\r\n formControlName=\"enablePhoneNumberConfirmation\"\r\n /><label class=\"form-check-label\" for=\"SignIn_EnablePhoneNumberConfirmation\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"SignIn_RequireConfirmedPhoneNumber\"\r\n name=\"SignIn.RequireConfirmedPhoneNumber\"\r\n class=\"form-check-input\"\r\n formControlName=\"requireConfirmedPhoneNumber\"\r\n /><label class=\"form-check-label\" for=\"SignIn_RequireConfirmedPhoneNumber\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber'\r\n | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n" }]
|
|
210
305
|
}] });
|
|
211
306
|
|
|
212
|
-
class
|
|
307
|
+
class IdentityUserProfileComponent {
|
|
213
308
|
constructor() {
|
|
214
|
-
this.
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
309
|
+
this.settings = {};
|
|
310
|
+
this.identityConfigService = inject(IdentityConfigService);
|
|
311
|
+
this.toaster = inject(ToasterService);
|
|
312
|
+
this.fb = inject(UntypedFormBuilder);
|
|
313
|
+
this.subscription = inject(SubscriptionService);
|
|
217
314
|
this.configState = inject(ConfigStateService);
|
|
218
315
|
}
|
|
219
316
|
ngOnInit() {
|
|
220
|
-
this.
|
|
317
|
+
this.identityConfigService.getSettings().subscribe(settings => {
|
|
318
|
+
this.settings = settings;
|
|
319
|
+
this.buildForm();
|
|
320
|
+
});
|
|
221
321
|
}
|
|
222
|
-
|
|
322
|
+
buildForm() {
|
|
323
|
+
const userSettings = this.settings?.user || {};
|
|
324
|
+
this.identityUserProfileForm = this.fb.group({
|
|
325
|
+
isUserNameUpdateEnabled: userSettings.isUserNameUpdateEnabled,
|
|
326
|
+
isEmailUpdateEnabled: userSettings.isEmailUpdateEnabled,
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
submit() {
|
|
330
|
+
if (this.loading || this.identityUserProfileForm?.invalid)
|
|
331
|
+
return;
|
|
223
332
|
this.loading = true;
|
|
224
|
-
this.
|
|
225
|
-
.
|
|
226
|
-
.pipe(finalize(() =>
|
|
227
|
-
.
|
|
228
|
-
this.toasterService.success('AbpUi::SavedSuccessfully', null);
|
|
333
|
+
this.identityConfigService
|
|
334
|
+
.updateSettings({ ...this.settings, user: this.identityUserProfileForm.value })
|
|
335
|
+
.pipe(finalize(() => {
|
|
336
|
+
this.loading = false;
|
|
229
337
|
this.configState.refreshAppState().subscribe();
|
|
230
|
-
})
|
|
338
|
+
}))
|
|
339
|
+
.subscribe(() => this.toaster.success('AbpUi::SavedSuccessfully', null));
|
|
231
340
|
}
|
|
232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type:
|
|
341
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityUserProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
342
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentityUserProfileComponent, isStandalone: false, selector: "abp-identity-user-profile", providers: [SubscriptionService], ngImport: i0, template: "@if (identityUserProfileForm) {\r\n <form id=\"identityUserProfileForm\" [formGroup]=\"identityUserProfileForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::UserSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsEmailUpdateEnabled\"\r\n name=\"User.IsEmailUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isEmailUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsEmailUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsUserNameUpdateEnabled\"\r\n name=\"User.IsUserNameUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isUserNameUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsUserNameUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
234
343
|
}
|
|
235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityUserProfileComponent, decorators: [{
|
|
236
345
|
type: Component,
|
|
237
|
-
args: [{ standalone: false, selector: 'abp-
|
|
346
|
+
args: [{ standalone: false, selector: 'abp-identity-user-profile', providers: [SubscriptionService], template: "@if (identityUserProfileForm) {\r\n <form id=\"identityUserProfileForm\" [formGroup]=\"identityUserProfileForm\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <h4>{{ 'AbpIdentity::UserSettings' | abpLocalization }}</h4>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsEmailUpdateEnabled\"\r\n name=\"User.IsEmailUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isEmailUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsEmailUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsEmailUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"User_IsUserNameUpdateEnabled\"\r\n name=\"User.IsUserNameUpdateEnabled\"\r\n class=\"form-check-input\"\r\n formControlName=\"isUserNameUpdateEnabled\"\r\n /><label class=\"form-check-label\" for=\"User_IsUserNameUpdateEnabled\">{{\r\n 'AbpIdentity::DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</label>\r\n <br/>\r\n <small class=\"form-text text-muted\">{{\r\n 'AbpIdentity::Description:Abp.Identity.User.IsUserNameUpdateEnabled' | abpLocalization\r\n }}</small>\r\n </div>\r\n <hr />\r\n <div>\r\n <abp-button\r\n iconClass=\"fa fa-save\"\r\n [loading]=\"loading\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </div>\r\n </form>\r\n}\r\n" }]
|
|
238
347
|
}] });
|
|
239
348
|
|
|
240
349
|
class IdentitySettingsComponent {
|
|
@@ -248,11 +357,11 @@ class IdentitySettingsComponent {
|
|
|
248
357
|
}
|
|
249
358
|
submit() { }
|
|
250
359
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentitySettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
251
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentitySettingsComponent, isStandalone: false, selector: "abp-identity-settings", providers: [SubscriptionService], ngImport: i0, template: "<div class=\"abp-md-form\">\r\n @if (features$ | async; as features) {\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::
|
|
360
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: IdentitySettingsComponent, isStandalone: false, selector: "abp-identity-settings", providers: [SubscriptionService], ngImport: i0, template: "<div class=\"abp-md-form\">\r\n @if (features$ | async; as features) {\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsPasswordPolicy' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-password-policy />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsLockout' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-lockout />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsIdentityVerification' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-verification />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsUserProfile' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-user-profile />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::Sessions' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-session-setting />\r\n </ng-template>\r\n </li>\r\n\r\n @for (feature of features; track $index) {\r\n <li ngbNavItem>\r\n <a ngbNavLink>\r\n {{\r\n (feature === externalLoginKey\r\n ? 'AbpIdentity::IdentitySettingsOAuth'\r\n : 'AbpIdentity::IdentitySettingsLdap'\r\n ) | abpLocalization\r\n }}\r\n </a>\r\n <ng-template ngbNavContent>\r\n @if (feature === externalLoginKey) {\r\n <abp-external-login-settings />\r\n } @else {\r\n <abp-ldap-login-settings />\r\n }\r\n </ng-template>\r\n </li>\r\n }\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\"></div>\r\n } @else {\r\n <abp-identity-setting />\r\n }\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i1$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i1$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i1$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i1$1.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i1$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i1$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: IdentitySessionsSettingComponent, selector: "abp-identity-session-setting" }, { kind: "component", type: IdentityExternalLoginSettingsComponent, selector: "abp-external-login-settings" }, { kind: "component", type: IdentityLdapSettingsComponent, selector: "abp-ldap-login-settings" }, { kind: "component", type: IdentityPasswordPolicyComponent, selector: "abp-identity-password-policy" }, { kind: "component", type: IdentityLockoutComponent, selector: "abp-identity-lockout" }, { kind: "component", type: IdentityVerificationComponent, selector: "abp-identity-verification" }, { kind: "component", type: IdentityUserProfileComponent, selector: "abp-identity-user-profile" }, { kind: "pipe", type: i9.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
252
361
|
}
|
|
253
362
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentitySettingsComponent, decorators: [{
|
|
254
363
|
type: Component,
|
|
255
|
-
args: [{ standalone: false, selector: 'abp-identity-settings', providers: [SubscriptionService], template: "<div class=\"abp-md-form\">\r\n @if (features$ | async; as features) {\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::
|
|
364
|
+
args: [{ standalone: false, selector: 'abp-identity-settings', providers: [SubscriptionService], template: "<div class=\"abp-md-form\">\r\n @if (features$ | async; as features) {\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsPasswordPolicy' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-password-policy />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsLockout' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-lockout />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsIdentityVerification' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-verification />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::IdentitySettingsUserProfile' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-user-profile />\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::Sessions' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-identity-session-setting />\r\n </ng-template>\r\n </li>\r\n\r\n @for (feature of features; track $index) {\r\n <li ngbNavItem>\r\n <a ngbNavLink>\r\n {{\r\n (feature === externalLoginKey\r\n ? 'AbpIdentity::IdentitySettingsOAuth'\r\n : 'AbpIdentity::IdentitySettingsLdap'\r\n ) | abpLocalization\r\n }}\r\n </a>\r\n <ng-template ngbNavContent>\r\n @if (feature === externalLoginKey) {\r\n <abp-external-login-settings />\r\n } @else {\r\n <abp-ldap-login-settings />\r\n }\r\n </ng-template>\r\n </li>\r\n }\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\"></div>\r\n } @else {\r\n <abp-identity-setting />\r\n }\r\n</div>\r\n" }]
|
|
256
365
|
}] });
|
|
257
366
|
|
|
258
367
|
class IdentityLinkLoginService {
|
|
@@ -733,7 +842,7 @@ class AuthorityDelegationComponent {
|
|
|
733
842
|
this.trackByFn = (_, item) => item.name;
|
|
734
843
|
}
|
|
735
844
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthorityDelegationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
736
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: AuthorityDelegationComponent, isStandalone: false, selector: "abp-authority-delegation", ngImport: i0, template: "<abp-modal [(visible)]=\"isModalOpen\" [suppressUnsavedChangesWarning]=\"true\" [options]=\"option\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">{{ 'AbpIdentity::AuthorityDelegation' | abpLocalization }}</h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <ul class=\"nav nav-tabs mb-0\">\r\n <li *abpFor=\"let tab of tabs; trackBy: trackByFn\" class=\"nav-item\">\r\n <a\r\n [id]=\"tab.name + '-tab'\"\r\n role=\"tab\"\r\n class=\"nav-link pointer\"\r\n [class.active]=\"selected.name === tab.name\"\r\n (click)=\"selected = tab\"\r\n >\r\n {{ tab.name | abpLocalization }}\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n <div class=\"tab-content\">\r\n <div class=\"tab-pane active\">\r\n <div class=\"card mb-0\">\r\n <ng-container *ngComponentOutlet=\"selected.component\"></ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type:
|
|
845
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: AuthorityDelegationComponent, isStandalone: false, selector: "abp-authority-delegation", ngImport: i0, template: "<abp-modal [(visible)]=\"isModalOpen\" [suppressUnsavedChangesWarning]=\"true\" [options]=\"option\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">{{ 'AbpIdentity::AuthorityDelegation' | abpLocalization }}</h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <ul class=\"nav nav-tabs mb-0\">\r\n <li *abpFor=\"let tab of tabs; trackBy: trackByFn\" class=\"nav-item\">\r\n <a\r\n [id]=\"tab.name + '-tab'\"\r\n role=\"tab\"\r\n class=\"nav-link pointer\"\r\n [class.active]=\"selected.name === tab.name\"\r\n (click)=\"selected = tab\"\r\n >\r\n {{ tab.name | abpLocalization }}\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n <div class=\"tab-content\">\r\n <div class=\"tab-pane active\">\r\n <div class=\"card mb-0\">\r\n <ng-container *ngComponentOutlet=\"selected.component\"></ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i9.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i2.ForDirective, selector: "[abpFor]", inputs: ["abpForOf", "abpForOrderBy", "abpForOrderDir", "abpForFilterBy", "abpForFilterVal", "abpForTrackBy", "abpForCompareBy", "abpForEmptyRef"] }, { kind: "component", type: i3$1.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
737
846
|
}
|
|
738
847
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthorityDelegationComponent, decorators: [{
|
|
739
848
|
type: Component,
|
|
@@ -896,10 +1005,13 @@ function provideIdentityConfig() {
|
|
|
896
1005
|
|
|
897
1006
|
const declarationsWithExports = [
|
|
898
1007
|
IdentitySettingsComponent,
|
|
899
|
-
IdentitySettingComponent,
|
|
900
1008
|
IdentityExternalLoginSettingsComponent,
|
|
901
1009
|
IdentityLdapSettingsComponent,
|
|
902
1010
|
MyLinkUsersModalComponent,
|
|
1011
|
+
IdentityPasswordPolicyComponent,
|
|
1012
|
+
IdentityLockoutComponent,
|
|
1013
|
+
IdentityVerificationComponent,
|
|
1014
|
+
IdentityUserProfileComponent,
|
|
903
1015
|
];
|
|
904
1016
|
class IdentityConfigModule {
|
|
905
1017
|
/**
|
|
@@ -913,20 +1025,26 @@ class IdentityConfigModule {
|
|
|
913
1025
|
}
|
|
914
1026
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
915
1027
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: IdentityConfigModule, declarations: [IdentitySettingsComponent,
|
|
916
|
-
IdentitySettingComponent,
|
|
917
1028
|
IdentityExternalLoginSettingsComponent,
|
|
918
1029
|
IdentityLdapSettingsComponent,
|
|
919
|
-
MyLinkUsersModalComponent
|
|
1030
|
+
MyLinkUsersModalComponent,
|
|
1031
|
+
IdentityPasswordPolicyComponent,
|
|
1032
|
+
IdentityLockoutComponent,
|
|
1033
|
+
IdentityVerificationComponent,
|
|
1034
|
+
IdentityUserProfileComponent], imports: [CoreModule,
|
|
920
1035
|
ThemeSharedModule,
|
|
921
1036
|
NgbDropdownModule,
|
|
922
1037
|
NgbNavModule,
|
|
923
1038
|
NgxValidateCoreModule,
|
|
924
1039
|
AuthorityDelegationModule,
|
|
925
1040
|
IdentitySessionsSettingComponent], exports: [IdentitySettingsComponent,
|
|
926
|
-
IdentitySettingComponent,
|
|
927
1041
|
IdentityExternalLoginSettingsComponent,
|
|
928
1042
|
IdentityLdapSettingsComponent,
|
|
929
|
-
MyLinkUsersModalComponent
|
|
1043
|
+
MyLinkUsersModalComponent,
|
|
1044
|
+
IdentityPasswordPolicyComponent,
|
|
1045
|
+
IdentityLockoutComponent,
|
|
1046
|
+
IdentityVerificationComponent,
|
|
1047
|
+
IdentityUserProfileComponent] }); }
|
|
930
1048
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: IdentityConfigModule, imports: [CoreModule,
|
|
931
1049
|
ThemeSharedModule,
|
|
932
1050
|
NgbDropdownModule,
|
|
@@ -956,5 +1074,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
956
1074
|
* Generated bundle index. Do not edit.
|
|
957
1075
|
*/
|
|
958
1076
|
|
|
959
|
-
export { AbpAuthorityDelegationService, AuthorityDelegationComponent, AuthorityDelegationModule, CreateUserDelegateComponent, IDENTITY_ROUTE_PROVIDERS, IDENTITY_SETTING_TAB_PROVIDERS, IdentityConfigModule, IdentityConfigService, IdentityExternalLoginSettingsComponent, IdentityLdapSettingsComponent, IdentityLinkLoginService,
|
|
1077
|
+
export { AbpAuthorityDelegationService, AuthorityDelegationComponent, AuthorityDelegationModule, CreateUserDelegateComponent, IDENTITY_ROUTE_PROVIDERS, IDENTITY_SETTING_TAB_PROVIDERS, IdentityConfigModule, IdentityConfigService, IdentityExternalLoginSettingsComponent, IdentityLdapSettingsComponent, IdentityLinkLoginService, IdentityLockoutComponent, IdentityPasswordPolicyComponent, IdentitySessionsSettingComponent, IdentitySettingsComponent, IdentityUserProfileComponent, IdentityVerificationComponent, LinkLoginHandler, ListAuthorityDelegationComponent, MyDelegatedUsersComponent, MyLinkUsersModalComponent, configureRoutes, configureSettingTabs, provideIdentityConfig, timeRangeValidator };
|
|
960
1078
|
//# sourceMappingURL=volo-abp.ng.identity-config.mjs.map
|