mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-31 11:32:15 +00:00
* feat: add possibility to ignore username errors on first login screen * console changes * fix: handling of unknown usernames (#3445) * fix: handling of unknown usernames * fix: handle HideLoginNameSuffix on unknown users * feat: add default redirect uri on login policy (#3607) * feat: add default redirect uri on login policy * fix tests * feat: Console login policy default redirect (#3613) * console default redirect * placeholder * validate default redirect uri * allow empty default redirect uri Co-authored-by: Max Peintner <[email protected]> * remove wonrgly cherry picked migration Co-authored-by: Max Peintner <[email protected]>
167 lines
5.3 KiB
HTML
167 lines
5.3 KiB
HTML
<!-- <cnsl-info-section *ngIf="isDefault"> {{ 'POLICY.DEFAULTLABEL' | translate }}</cnsl-info-section> -->
|
|
|
|
<div class="spinner-wr">
|
|
<mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner>
|
|
</div>
|
|
|
|
<h2>{{ 'MFA.LIST.MULTIFACTORTITLE' | translate }}</h2>
|
|
<p class="cnsl-secondary-text">{{ 'MFA.LIST.MULTIFACTORDESCRIPTION' | translate }}</p>
|
|
|
|
<div class="login-policy-row" *ngIf="loginData">
|
|
<cnsl-form-field class="passwordless-allowed" label="Access Code" required="true">
|
|
<cnsl-label>{{ 'LOGINPOLICY.PASSWORDLESS' | translate }}</cnsl-label>
|
|
<mat-select [(ngModel)]="loginData.passwordlessType">
|
|
<mat-option *ngFor="let pt of passwordlessTypes" [value]="pt">
|
|
{{ 'LOGINPOLICY.PASSWORDLESSTYPE.' + pt | translate }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</cnsl-form-field>
|
|
</div>
|
|
|
|
<cnsl-card class="max-card-width">
|
|
<cnsl-mfa-table
|
|
[service]="service"
|
|
[serviceType]="serviceType"
|
|
[componentType]="LoginMethodComponentType.MultiFactor"
|
|
[disabled]="
|
|
loginData?.passwordlessType === PasswordlessType.PASSWORDLESS_TYPE_NOT_ALLOWED ||
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
</cnsl-mfa-table>
|
|
</cnsl-card>
|
|
|
|
<br />
|
|
|
|
<h2>{{ 'MFA.LIST.SECONDFACTORTITLE' | translate }}</h2>
|
|
<p class="cnsl-secondary-text">{{ 'MFA.LIST.SECONDFACTORDESCRIPTION' | translate }}</p>
|
|
|
|
<div *ngIf="loginData" class="login-policy-row">
|
|
<mat-slide-toggle
|
|
card-actions
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.forceMfa"
|
|
>
|
|
{{ 'POLICY.DATA.FORCEMFA' | translate }}
|
|
</mat-slide-toggle>
|
|
</div>
|
|
<cnsl-card class="max-card-width">
|
|
<cnsl-mfa-table
|
|
[service]="service"
|
|
[serviceType]="serviceType"
|
|
[componentType]="LoginMethodComponentType.SecondFactor"
|
|
[disabled]="
|
|
([
|
|
serviceType === PolicyComponentServiceType.ADMIN
|
|
? 'iam.policy.write'
|
|
: serviceType === PolicyComponentServiceType.MGMT
|
|
? 'policy.write'
|
|
: ''
|
|
]
|
|
| hasRole
|
|
| async) === false
|
|
"
|
|
>
|
|
</cnsl-mfa-table>
|
|
</cnsl-card>
|
|
|
|
<br />
|
|
|
|
<h2>{{ 'POLICY.LOGIN_POLICY.ADVANCED' | translate }}</h2>
|
|
|
|
<cnsl-card class="max-card-width login-policy-content" *ngIf="loginData">
|
|
<div class="login-policy-row">
|
|
<mat-slide-toggle
|
|
class="login-policy-toggle"
|
|
color="primary"
|
|
matTooltip="{{ 'POLICY.DATA.FORCEMFA_DESC' | translate }}"
|
|
ngDefaultControl
|
|
[(ngModel)]="loginData.allowUsernamePassword"
|
|
>
|
|
{{ 'POLICY.DATA.ALLOWUSERNAMEPASSWORD' | translate }}
|
|
</mat-slide-toggle>
|
|
|
|
<!-- <cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.ALLOWUSERNAMEPASSWORD_DESC' | translate }}
|
|
</cnsl-info-section> -->
|
|
</div>
|
|
<div class="login-policy-row">
|
|
<mat-slide-toggle class="login-policy-toggle" color="primary" ngDefaultControl [(ngModel)]="loginData.allowRegister">
|
|
{{ 'POLICY.DATA.ALLOWREGISTER' | translate }}
|
|
</mat-slide-toggle>
|
|
|
|
<!-- <ng-template #regInfo>
|
|
<cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.ALLOWREGISTER_DESC' | translate }}
|
|
</cnsl-info-section>
|
|
</ng-template> -->
|
|
</div>
|
|
<div class="login-policy-row">
|
|
<mat-slide-toggle class="login-policy-toggle" color="primary" ngDefaultControl [(ngModel)]="loginData.allowExternalIdp">
|
|
{{ 'POLICY.DATA.ALLOWEXTERNALIDP' | translate }}
|
|
</mat-slide-toggle>
|
|
|
|
<!-- <ng-template #idpInfo>
|
|
<cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.ALLOWEXTERNALIDP_DESC' | translate }}
|
|
</cnsl-info-section>
|
|
</ng-template> -->
|
|
</div>
|
|
|
|
<div class="login-policy-row">
|
|
<mat-slide-toggle class="login-policy-toggle" color="primary" ngDefaultControl [(ngModel)]="loginData.hidePasswordReset">
|
|
{{ 'POLICY.DATA.HIDEPASSWORDRESET' | translate }}
|
|
</mat-slide-toggle>
|
|
|
|
<!-- <ng-template #passwordResetInfo>
|
|
<cnsl-info-section class="info">
|
|
{{ 'POLICY.DATA.HIDEPASSWORDRESET_DESC' | translate }}
|
|
</cnsl-info-section>
|
|
</ng-template> -->
|
|
</div>
|
|
|
|
<div class="login-policy-row">
|
|
<mat-slide-toggle class="login-policy-toggle" color="primary" ngDefaultControl [(ngModel)]="loginData.ignoreUnknownUsernames">
|
|
{{ 'POLICY.DATA.IGNOREUNKNOWNUSERNAMES' | translate }}
|
|
</mat-slide-toggle>
|
|
</div>
|
|
|
|
<div class="login-policy-row">
|
|
<cnsl-form-field class="form-field" label="Access Code" required="true">
|
|
<cnsl-label>{{ 'POLICY.DATA.DEFAULTREDIRECTURI' | translate }}</cnsl-label>
|
|
<input cnslInput placeholder="https://" [(ngModel)]="loginData.defaultRedirectUri" />
|
|
</cnsl-form-field>
|
|
</div>
|
|
</cnsl-card>
|
|
|
|
<div class="login-policy-btn-container">
|
|
<button class="login-policy-save-button" (click)="savePolicy()" color="primary" type="submit" mat-raised-button>
|
|
{{ 'ACTIONS.SAVE' | translate }}
|
|
</button>
|
|
</div>
|
|
|
|
<ng-container *ngIf="serviceType === PolicyComponentServiceType.MGMT">
|
|
<ng-template cnslHasRole [hasRole]="['policy.delete']">
|
|
<button
|
|
*ngIf="!isDefault"
|
|
color="primary"
|
|
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
|
color="warn"
|
|
(click)="removePolicy()"
|
|
mat-stroked-button
|
|
>
|
|
{{ 'POLICY.RESET' | translate }}
|
|
</button>
|
|
</ng-template>
|
|
</ng-container>
|