|
|
|
@ -33,7 +33,7 @@ |
|
|
|
<ng-container> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>admin.2fa.verification-limitations</legend> |
|
|
|
<div class="input-row" fxLayout="row" fxLayout.sm="column" fxLayoutGap="8px"> |
|
|
|
<div class="input-row" fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.total-allowed-time-for-verification</mat-label> |
|
|
|
<input matInput required formControlName="totalAllowedTimeForVerification" type="number" step="1" min="1"> |
|
|
|
@ -58,62 +58,137 @@ |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<mat-slide-toggle class="rate-limit-toggle" formControlName="verificationCodeSendRateLimitEnable"> |
|
|
|
{{ 'admin.2fa.verification-code-send-rate-limit' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
<div class="input-row" fxLayout="row" fxLayout.sm="column" fxLayoutGap="8px" |
|
|
|
*ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitEnable').value"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.number-of-send-attempts</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeSendRateLimitNumber" type="number" step="1" min="1" required> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('required')"> |
|
|
|
{{ 'admin.2fa.number-of-send-attempts-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('pattern') |
|
|
|
<mat-expansion-panel class="provider"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-title fxLayoutAlign="start center"> |
|
|
|
<mat-slide-toggle |
|
|
|
(click)="toggleExtensionPanel($event, 0, twoFaFormGroup.get('verificationCodeSendRateLimitEnable').value)" |
|
|
|
formControlName="verificationCodeSendRateLimitEnable"> |
|
|
|
</mat-slide-toggle> |
|
|
|
{{ 'admin.2fa.verification-code-send-rate-limit' | translate }} |
|
|
|
</mat-panel-title> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.number-of-send-attempts</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeSendRateLimitNumber" type="number" step="1" min="1" required> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('required')"> |
|
|
|
{{ 'admin.2fa.number-of-send-attempts-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('pattern') |
|
|
|
|| twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('min')"> |
|
|
|
{{ 'admin.2fa.number-of-send-attempts-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.within-time</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeSendRateLimitTime" type="number" step="1" min="1" required> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('required')"> |
|
|
|
{{ 'admin.2fa.within-time-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('pattern') |
|
|
|
{{ 'admin.2fa.number-of-send-attempts-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.within-time</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeSendRateLimitTime" type="number" step="1" min="1" required> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('required')"> |
|
|
|
{{ 'admin.2fa.within-time-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('pattern') |
|
|
|
|| twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('min')"> |
|
|
|
{{ 'admin.2fa.within-time-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<mat-slide-toggle class="rate-limit-toggle" formControlName="verificationCodeCheckRateLimitEnable"> |
|
|
|
{{ 'admin.2fa.verification-code-check-rate-limit' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
<div class="input-row" fxLayout="row" fxLayout.sm="column" fxLayoutGap="8px" |
|
|
|
*ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitEnable').value"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.number-of-checking-attempts</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeCheckRateLimitNumber" required type="number" step="1" min="1"> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('required')"> |
|
|
|
{{ 'admin.2fa.number-of-checking-attempts-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('pattern') |
|
|
|
{{ 'admin.2fa.within-time-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
<!-- <mat-slide-toggle class="rate-limit-toggle" formControlName="verificationCodeSendRateLimitEnable">--> |
|
|
|
<!-- {{ 'admin.2fa.verification-code-send-rate-limit' | translate }}--> |
|
|
|
<!-- </mat-slide-toggle>--> |
|
|
|
<!-- <div class="input-row" fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"--> |
|
|
|
<!-- *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitEnable').value">--> |
|
|
|
<!-- <mat-form-field fxFlex class="mat-block">--> |
|
|
|
<!-- <mat-label translate>admin.2fa.number-of-send-attempts</mat-label>--> |
|
|
|
<!-- <input matInput formControlName="verificationCodeSendRateLimitNumber" type="number" step="1" min="1" required>--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('required')">--> |
|
|
|
<!-- {{ 'admin.2fa.number-of-send-attempts-required' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('pattern')--> |
|
|
|
<!-- || twoFaFormGroup.get('verificationCodeSendRateLimitNumber').hasError('min')">--> |
|
|
|
<!-- {{ 'admin.2fa.number-of-send-attempts-pattern' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- </mat-form-field>--> |
|
|
|
<!-- <mat-form-field fxFlex class="mat-block">--> |
|
|
|
<!-- <mat-label translate>admin.2fa.within-time</mat-label>--> |
|
|
|
<!-- <input matInput formControlName="verificationCodeSendRateLimitTime" type="number" step="1" min="1" required>--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('required')">--> |
|
|
|
<!-- {{ 'admin.2fa.within-time-required' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('pattern')--> |
|
|
|
<!-- || twoFaFormGroup.get('verificationCodeSendRateLimitTime').hasError('min')">--> |
|
|
|
<!-- {{ 'admin.2fa.within-time-pattern' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- </mat-form-field>--> |
|
|
|
<!-- </div>--> |
|
|
|
<mat-divider></mat-divider> |
|
|
|
<mat-expansion-panel class="provider"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-title fxLayoutAlign="start center"> |
|
|
|
<mat-slide-toggle class="rate-limit-toggle" |
|
|
|
(click)="toggleExtensionPanel($event, 1, twoFaFormGroup.get('verificationCodeCheckRateLimitEnable').value)" |
|
|
|
formControlName="verificationCodeCheckRateLimitEnable"> |
|
|
|
</mat-slide-toggle> |
|
|
|
{{ 'admin.2fa.verification-code-check-rate-limit' | translate }} |
|
|
|
</mat-panel-title> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.number-of-checking-attempts</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeCheckRateLimitNumber" required type="number" step="1" min="1"> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('required')"> |
|
|
|
{{ 'admin.2fa.number-of-checking-attempts-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('pattern') |
|
|
|
|| twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('min')"> |
|
|
|
{{ 'admin.2fa.number-of-checking-attempts-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.within-time</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeCheckRateLimitTime" required type="number" step="1" min="1"> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('required')"> |
|
|
|
{{ 'admin.2fa.within-time-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('pattern') |
|
|
|
{{ 'admin.2fa.number-of-checking-attempts-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>admin.2fa.within-time</mat-label> |
|
|
|
<input matInput formControlName="verificationCodeCheckRateLimitTime" required type="number" step="1" min="1"> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('required')"> |
|
|
|
{{ 'admin.2fa.within-time-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('pattern') |
|
|
|
|| twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('min')"> |
|
|
|
{{ 'admin.2fa.within-time-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
{{ 'admin.2fa.within-time-pattern' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
<!-- <mat-slide-toggle class="rate-limit-toggle" formControlName="verificationCodeCheckRateLimitEnable">--> |
|
|
|
<!-- {{ 'admin.2fa.verification-code-check-rate-limit' | translate }}--> |
|
|
|
<!-- </mat-slide-toggle>--> |
|
|
|
<!-- <div class="input-row" fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"--> |
|
|
|
<!-- *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitEnable').value">--> |
|
|
|
<!-- <mat-form-field fxFlex class="mat-block">--> |
|
|
|
<!-- <mat-label translate>admin.2fa.number-of-checking-attempts</mat-label>--> |
|
|
|
<!-- <input matInput formControlName="verificationCodeCheckRateLimitNumber" required type="number" step="1" min="1">--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('required')">--> |
|
|
|
<!-- {{ 'admin.2fa.number-of-checking-attempts-required' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('pattern')--> |
|
|
|
<!-- || twoFaFormGroup.get('verificationCodeCheckRateLimitNumber').hasError('min')">--> |
|
|
|
<!-- {{ 'admin.2fa.number-of-checking-attempts-pattern' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- </mat-form-field>--> |
|
|
|
<!-- <mat-form-field fxFlex class="mat-block">--> |
|
|
|
<!-- <mat-label translate>admin.2fa.within-time</mat-label>--> |
|
|
|
<!-- <input matInput formControlName="verificationCodeCheckRateLimitTime" required type="number" step="1" min="1">--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('required')">--> |
|
|
|
<!-- {{ 'admin.2fa.within-time-required' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- <mat-error *ngIf="twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('pattern')--> |
|
|
|
<!-- || twoFaFormGroup.get('verificationCodeCheckRateLimitTime').hasError('min')">--> |
|
|
|
<!-- {{ 'admin.2fa.within-time-pattern' | translate }}--> |
|
|
|
<!-- </mat-error>--> |
|
|
|
<!-- </mat-form-field>--> |
|
|
|
<!-- </div>--> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group" formArrayName="providers"> |
|
|
|
<legend class="group-title" translate>admin.2fa.available-providers</legend> |
|
|
|
|