mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-01 01:52:18 +00:00
parent
cc7556aaa0
commit
8519243669
@ -3,42 +3,6 @@
|
||||
<p class="top-desc">{{'ORG.POLICY.DESCRIPTION' | translate}}</p>
|
||||
|
||||
<div class="row-lyt">
|
||||
<!-- <div class="p-item card">
|
||||
<div class="avatar">
|
||||
<mat-icon svgIcon="mdi_lock_reset"></mat-icon>
|
||||
</div>
|
||||
<div class="title">
|
||||
<span>{{'ORG.POLICY.PWD_AGE.TITLE' | translate}}</span>
|
||||
<button mat-icon-button disabled>
|
||||
<mat-icon class="icon" *ngIf="agePolicy">check_circle</mat-icon>
|
||||
</button>
|
||||
|
||||
<ng-template appHasRole [appHasRole]="['policy.delete']">
|
||||
<button matTooltip="{{'ORG.POLICY.DELETE' | translate}}" (click)="deletePolicy(PolicyComponentType.AGE)"
|
||||
mat-icon-button>
|
||||
<i class="las la-trash"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<p *ngIf="agePolicy?.description; else showDescAge" class="desc">{{ agePolicy.description }}</p>
|
||||
<ng-template #showDescAge>
|
||||
<p class="desc">
|
||||
{{'ORG.POLICY.PWD_AGE.DESCRIPTION' | translate}}
|
||||
</p>
|
||||
</ng-template>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
<div class="btn-wrapper">
|
||||
<ng-template appHasRole [appHasRole]="['policy.write']">
|
||||
<button [disabled]="agePolicy" [routerLink]="[ 'policy', PolicyComponentType.AGE,'create' ]"
|
||||
[disabled]="agePolicy?.state === PolicyState.ACTIVE_POLICY" color="primary"
|
||||
mat-raised-button>{{'ORG.POLICY.BTN_INSTALL' | translate}}</button>
|
||||
</ng-template>
|
||||
<button [disabled]="!agePolicy" [routerLink]="[ 'policy', PolicyComponentType.AGE ]"
|
||||
mat-raised-button>{{'ORG.POLICY.BTN_EDIT' | translate}}</button>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="p-item card">
|
||||
<div class="avatar">
|
||||
<mat-icon svgIcon="mdi_textbox_password"></mat-icon>
|
||||
@ -65,35 +29,7 @@
|
||||
mat-raised-button>{{'ORG.POLICY.BTN_EDIT' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="p-item card">
|
||||
<div class="avatar">
|
||||
<mat-icon svgIcon="mdi_lock_question"></mat-icon>
|
||||
</div>
|
||||
<div class="title"><span>{{'ORG.POLICY.PWD_LOCKOUT.TITLE' | translate}}</span>
|
||||
<button mat-icon-button disabled>
|
||||
<mat-icon class="icon" *ngIf="lockoutPolicy">check_circle
|
||||
</mat-icon>
|
||||
</button>
|
||||
<button matTooltip="{{'ORG.POLICY.DELETE' | translate}}" (click)="deletePolicy(PolicyComponentType.LOCKOUT)"
|
||||
mat-icon-button>
|
||||
<i class="las la-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p *ngIf="lockoutPolicy?.description; else showDescLockout" class="desc">{{ lockoutPolicy.description }}</p>
|
||||
<ng-template #showDescLockout>
|
||||
<p class="desc">
|
||||
{{'ORG.POLICY.PWD_LOCKOUT.DESCRIPTION' | translate}}
|
||||
</p>
|
||||
</ng-template>
|
||||
<span class="fill-space"></span>
|
||||
<div class="btn-wrapper">
|
||||
<button [disabled]="lockoutPolicy" [routerLink]="[ 'policy', PolicyComponentType.LOCKOUT,'create' ]"
|
||||
color="primary" mat-raised-button>{{'ORG.POLICY.BTN_INSTALL' | translate}}</button>
|
||||
<button [disabled]="!lockoutPolicy" [routerLink]="[ 'policy', PolicyComponentType.LOCKOUT ]"
|
||||
mat-raised-button>{{'ORG.POLICY.BTN_EDIT' | translate}}</button>
|
||||
</div>
|
||||
</div> -->
|
||||
<ng-template appHasRole [appHasRole]="['iam.policy.read']">
|
||||
<div class="p-item card">
|
||||
<div class="avatar"><i class="icon las la-gem"></i>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
OrgIamPolicy,
|
||||
PasswordAgePolicy,
|
||||
@ -6,10 +6,8 @@ import {
|
||||
PasswordLockoutPolicy,
|
||||
PolicyState,
|
||||
} from 'src/app/proto/generated/management_pb';
|
||||
import { AdminService } from 'src/app/services/admin.service';
|
||||
import { AuthUserService } from 'src/app/services/auth-user.service';
|
||||
import { OrgService } from 'src/app/services/org.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
import { PolicyComponentType } from '../password-policy/password-policy.component';
|
||||
|
||||
@ -18,7 +16,7 @@ import { PolicyComponentType } from '../password-policy/password-policy.componen
|
||||
templateUrl: './policy-grid.component.html',
|
||||
styleUrls: ['./policy-grid.component.scss'],
|
||||
})
|
||||
export class PolicyGridComponent implements OnInit {
|
||||
export class PolicyGridComponent {
|
||||
public lockoutPolicy!: PasswordLockoutPolicy.AsObject;
|
||||
public agePolicy!: PasswordAgePolicy.AsObject;
|
||||
public complexityPolicy!: PasswordComplexityPolicy.AsObject;
|
||||
@ -29,22 +27,13 @@ export class PolicyGridComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
private orgService: OrgService,
|
||||
private adminService: AdminService,
|
||||
public authUserService: AuthUserService,
|
||||
private toast: ToastService,
|
||||
) {
|
||||
this.getData();
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
private getData(): void {
|
||||
// this.orgService.GetPasswordLockoutPolicy().then(data => this.lockoutPolicy = data.toObject()).catch(error => { });
|
||||
// this.orgService.GetPasswordAgePolicy().then(data => this.agePolicy = data.toObject()).catch(error => { });
|
||||
this.orgService.GetPasswordComplexityPolicy().then(data => this.complexityPolicy = data.toObject())
|
||||
.catch(error => { });
|
||||
this.orgService.GetMyOrgIamPolicy().then(data => this.iamPolicy = data.toObject())
|
||||
.catch(error => { });
|
||||
this.orgService.GetPasswordComplexityPolicy().then(data => this.complexityPolicy = data.toObject());
|
||||
this.orgService.GetMyOrgIamPolicy().then(data => this.iamPolicy = data.toObject());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user