mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-17 10:55:12 +00:00
feat(console): v2 feature cleanup, fix styling issues, instance naming (#3530)
* new console * move npm ci to angular build * rel path for assets * local grpc copy * login policy, rm clear views, features rel path * login_hint param * edit default color values * remove features, zitadel-tier, contact styles * html formatter * rm feature restrictions, fix theming issues * instance naming * statehandler * rm class * rm class * update footer links * statehandler * stroked color Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
f9e79ef8fe
commit
41e60b3d8a
+85
-39
@@ -1,8 +1,12 @@
|
||||
<cnsl-top-view title="{{user?.human ? user.human?.profile?.displayName :
|
||||
user?.machine?.name}}" sub="{{user?.preferredLoginName}}" [isActive]="user?.state === UserState.USER_STATE_ACTIVE"
|
||||
[isInactive]="user?.state === UserState.USER_STATE_INACTIVE" stateTooltip="{{'USER.STATE.'+user?.state | translate}}"
|
||||
[hasBackButton]="(['org.read'] | hasRole | async)" (backRouterLink)="['/']">
|
||||
|
||||
<cnsl-top-view
|
||||
title="{{ user?.human ? user.human?.profile?.displayName : user?.machine?.name }}"
|
||||
sub="{{ user?.preferredLoginName }}"
|
||||
[isActive]="user?.state === UserState.USER_STATE_ACTIVE"
|
||||
[isInactive]="user?.state === UserState.USER_STATE_INACTIVE"
|
||||
stateTooltip="{{ 'USER.STATE.' + user?.state | translate }}"
|
||||
[hasBackButton]="['org.read'] | hasRole | async"
|
||||
(backRouterLink)="(['/'])"
|
||||
>
|
||||
<span *ngIf="!loading && !user">{{ 'USER.PAGES.NOUSER' | translate }}</span>
|
||||
<cnsl-info-row topContent *ngIf="user" [user]="user"></cnsl-info-row>
|
||||
</cnsl-top-view>
|
||||
@@ -15,35 +19,62 @@
|
||||
<cnsl-meta-layout>
|
||||
<cnsl-sidenav [(ngModel)]="currentSetting" [settingsList]="settingsList">
|
||||
<ng-container *ngIf="currentSetting === 'general'">
|
||||
<cnsl-card *ngIf="user && user.human && user.human.profile" class=" app-card"
|
||||
title="{{ 'USER.PROFILE.TITLE' | translate }}">
|
||||
<cnsl-detail-form [showEditImage]="true" [preferredLoginName]="user.preferredLoginName" [genders]="genders"
|
||||
[languages]="languages" [username]="user.userName" [user]="user.human" [disabled]="false"
|
||||
(changedLanguage)="changedLanguage($event)" (changeUsernameClicked)="changeUsername()"
|
||||
(submitData)="saveProfile($event)">
|
||||
<cnsl-card
|
||||
*ngIf="user && user.human && user.human.profile"
|
||||
class="app-card"
|
||||
title="{{ 'USER.PROFILE.TITLE' | translate }}"
|
||||
>
|
||||
<cnsl-detail-form
|
||||
[showEditImage]="true"
|
||||
[preferredLoginName]="user.preferredLoginName"
|
||||
[genders]="genders"
|
||||
[languages]="languages"
|
||||
[username]="user.userName"
|
||||
[user]="user.human"
|
||||
[disabled]="false"
|
||||
(changedLanguage)="changedLanguage($event)"
|
||||
(changeUsernameClicked)="changeUsername()"
|
||||
(submitData)="saveProfile($event)"
|
||||
>
|
||||
</cnsl-detail-form>
|
||||
</cnsl-card>
|
||||
|
||||
<cnsl-card *ngIf="user" title="{{ 'USER.LOGINMETHODS.TITLE' | translate }}"
|
||||
description="{{ 'USER.LOGINMETHODS.DESCRIPTION' | translate }}">
|
||||
<button class="icon-button" card-actions mat-icon-button (click)="refreshUser()"
|
||||
matTooltip="{{'ACTIONS.REFRESH' | translate}}">
|
||||
<cnsl-card
|
||||
*ngIf="user"
|
||||
title="{{ 'USER.LOGINMETHODS.TITLE' | translate }}"
|
||||
description="{{ 'USER.LOGINMETHODS.DESCRIPTION' | translate }}"
|
||||
>
|
||||
<button
|
||||
class="icon-button"
|
||||
card-actions
|
||||
mat-icon-button
|
||||
(click)="refreshUser()"
|
||||
matTooltip="{{ 'ACTIONS.REFRESH' | translate }}"
|
||||
>
|
||||
<mat-icon class="icon">refresh</mat-icon>
|
||||
</button>
|
||||
<cnsl-contact *ngIf="user.human" [human]="user.human" [state]="user.state" [canWrite]="true"
|
||||
(editType)="openEditDialog($event)" (enteredPhoneCode)="enteredPhoneCode($event)"
|
||||
(deletedPhone)="deletePhone()" (resendEmailVerification)="resendEmailVerification()"
|
||||
(resendPhoneVerification)="resendPhoneVerification()">
|
||||
<cnsl-contact
|
||||
*ngIf="user.human"
|
||||
[human]="user.human"
|
||||
[state]="user.state"
|
||||
[canWrite]="true"
|
||||
(editType)="openEditDialog($event)"
|
||||
(enteredPhoneCode)="enteredPhoneCode($event)"
|
||||
(deletedPhone)="deletePhone()"
|
||||
(resendEmailVerification)="resendEmailVerification()"
|
||||
(resendPhoneVerification)="resendPhoneVerification()"
|
||||
>
|
||||
</cnsl-contact>
|
||||
</cnsl-card>
|
||||
|
||||
<ng-template cnslHasRole [hasRole]="['user.self.delete']">
|
||||
<cnsl-card title="{{'USER.PAGES.DELETEACCOUNT'| translate}}" [warn]="true">
|
||||
<p>{{'USER.PAGES.DELETEACCOUNT_DESC'| translate}}</p>
|
||||
<cnsl-card title="{{ 'USER.PAGES.DELETEACCOUNT' | translate }}" [warn]="true">
|
||||
<p>{{ 'USER.PAGES.DELETEACCOUNT_DESC' | translate }}</p>
|
||||
|
||||
<div class="delete-account-wrapper">
|
||||
<button color="warn" mat-raised-button (click)="deleteAccount()">{{'USER.PAGES.DELETEACCOUNT_BTN' |
|
||||
translate}}</button>
|
||||
<button color="warn" mat-raised-button (click)="deleteAccount()">
|
||||
{{ 'USER.PAGES.DELETEACCOUNT_BTN' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</cnsl-card>
|
||||
</ng-template>
|
||||
@@ -62,33 +93,48 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentSetting === 'grants'">
|
||||
<cnsl-card *ngIf="user?.id" title="{{ 'GRANTS.USER.TITLE' | translate }}"
|
||||
description="{{'GRANTS.USER.DESCRIPTION' | translate }}">
|
||||
<cnsl-user-grants [userId]="user.id" [context]="USERGRANTCONTEXT"
|
||||
[displayedColumns]="['select', 'org','projectId', 'type','creationDate','changeDate', 'roleNamesList', 'actions']"
|
||||
[disableWrite]="((['user.grant.write$'] | hasRole) | async) === false"
|
||||
[disableDelete]="((['user.grant.delete$'] | hasRole) | async) === false">
|
||||
<cnsl-card
|
||||
*ngIf="user?.id"
|
||||
title="{{ 'GRANTS.USER.TITLE' | translate }}"
|
||||
description="{{ 'GRANTS.USER.DESCRIPTION' | translate }}"
|
||||
>
|
||||
<cnsl-user-grants
|
||||
[userId]="user.id"
|
||||
[context]="USERGRANTCONTEXT"
|
||||
[displayedColumns]="[
|
||||
'select',
|
||||
'org',
|
||||
'projectId',
|
||||
'type',
|
||||
'creationDate',
|
||||
'changeDate',
|
||||
'roleNamesList',
|
||||
'actions'
|
||||
]"
|
||||
[disableWrite]="(['user.grant.write$'] | hasRole | async) === false"
|
||||
[disableDelete]="(['user.grant.delete$'] | hasRole | async) === false"
|
||||
>
|
||||
</cnsl-user-grants>
|
||||
</cnsl-card>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentSetting === 'memberships'">
|
||||
<cnsl-card *ngIf="user?.id" title="{{ 'USER.MEMBERSHIPS.TITLE' | translate }}"
|
||||
description="{{'USER.MEMBERSHIPS.DESCRIPTION' | translate }}">
|
||||
<cnsl-card
|
||||
*ngIf="user?.id"
|
||||
title="{{ 'USER.MEMBERSHIPS.TITLE' | translate }}"
|
||||
description="{{ 'USER.MEMBERSHIPS.DESCRIPTION' | translate }}"
|
||||
>
|
||||
<cnsl-memberships-table></cnsl-memberships-table>
|
||||
</cnsl-card>
|
||||
</ng-container>
|
||||
|
||||
<ng-template cnslHasFeature [hasFeature]="['metadata.user']">
|
||||
<ng-container *ngIf="currentSetting === 'metadata'">
|
||||
<cnsl-metadata *ngIf="user?.id" [userId]="user.id"></cnsl-metadata>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-container *ngIf="currentSetting === 'metadata'">
|
||||
<cnsl-metadata *ngIf="user?.id" [userId]="user.id"></cnsl-metadata>
|
||||
</ng-container>
|
||||
</cnsl-sidenav>
|
||||
|
||||
<div metainfo>
|
||||
<cnsl-changes class="changes" [refresh]="refreshChanges$" [changeType]="ChangeType.MYUSER">
|
||||
</cnsl-changes>
|
||||
<cnsl-changes class="changes" [refresh]="refreshChanges$" [changeType]="ChangeType.MYUSER"> </cnsl-changes>
|
||||
</div>
|
||||
</cnsl-meta-layout>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
<div class="method-col">
|
||||
<div class="method-row">
|
||||
<div class="left">
|
||||
<span class="label cnsl-secondary-text">{{ 'USER.PROFILE.PASSWORD' | translate }}</span>
|
||||
<span class="name">*********</span>
|
||||
<div class="contact-method-col">
|
||||
<div class="contact-method-row">
|
||||
<div class="left">
|
||||
<span class="label cnsl-secondary-text">{{ 'USER.PROFILE.PASSWORD' | translate }}</span>
|
||||
<span class="name">*********</span>
|
||||
|
||||
<ng-content select="[pwdAction]"></ng-content>
|
||||
<ng-content select="[pwdAction]"></ng-content>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<a matTooltip="{{'USER.PASSWORD.SET' | translate}}" [disabled]="!canWrite" [routerLink]="['password']"
|
||||
mat-icon-button>
|
||||
<i class="las la-pen"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<a matTooltip="{{'USER.PASSWORD.SET' | translate}}" [disabled]="!canWrite" [routerLink]="['password']"
|
||||
mat-icon-button>
|
||||
<i class="las la-pen"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contact-method-row">
|
||||
<div class="left">
|
||||
<span class="label cnsl-secondary-text">{{ 'USER.EMAIL' | translate }}</span>
|
||||
<span class="name">{{human?.email?.email}}</span>
|
||||
<span *ngIf="human?.email?.isEmailVerified" class="contact-state verified">{{'USER.EMAILVERIFIED' |
|
||||
translate}}</span>
|
||||
<div *ngIf="!human?.email?.isEmailVerified" class="block">
|
||||
<span class="contact-state notverified">{{'USER.NOTVERIFIED' | translate}}</span>
|
||||
|
||||
<div class="method-row">
|
||||
<div class="left">
|
||||
<span class="label cnsl-secondary-text">{{ 'USER.EMAIL' | translate }}</span>
|
||||
<span class="name">{{human?.email?.email}}</span>
|
||||
<span *ngIf="human?.email?.isEmailVerified" class="contact-state verified">{{'USER.EMAILVERIFIED' |
|
||||
translate}}</span>
|
||||
<div *ngIf="!human?.email?.isEmailVerified" class="block">
|
||||
<span class="contact-state notverified">{{'USER.NOTVERIFIED' | translate}}</span>
|
||||
<ng-container *ngIf="human?.email">
|
||||
<a *ngIf="canWrite" class="verify cnsl-secondary-text"
|
||||
matTooltip="{{'USER.LOGINMETHODS.EMAIL.RESEND' | translate}}"
|
||||
(click)="emitEmailVerification()">{{'USER.LOGINMETHODS.RESENDCODE' | translate}}</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="human?.email">
|
||||
<a *ngIf="canWrite" class="verify cnsl-secondary-text"
|
||||
matTooltip="{{'USER.LOGINMETHODS.EMAIL.RESEND' | translate}}"
|
||||
(click)="emitEmailVerification()">{{'USER.LOGINMETHODS.RESENDCODE' | translate}}</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
<ng-content select="[emailAction]"></ng-content>
|
||||
</div>
|
||||
|
||||
<ng-content select="[emailAction]"></ng-content>
|
||||
<div class="right">
|
||||
<button matTooltip="{{'ACTIONS.EDIT' | translate}}"
|
||||
[disabled]="!canWrite || state === UserState.USER_STATE_INITIAL"
|
||||
(click)="openEditDialog(EditDialogType.EMAIL)" mat-icon-button>
|
||||
<i class="las la-pen"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<button matTooltip="{{'ACTIONS.EDIT' | translate}}"
|
||||
[disabled]="!canWrite || state === UserState.USER_STATE_INITIAL" (click)="openEditDialog(EditDialogType.EMAIL)"
|
||||
mat-icon-button>
|
||||
<i class="las la-pen"></i>
|
||||
</button>
|
||||
<div class="contact-method-row">
|
||||
<div class="left">
|
||||
<span class="label cnsl-secondary-text">{{ 'USER.PHONE' | translate }}</span>
|
||||
<span class="name">{{human?.phone?.phone ? human.phone?.phone : ('USER.PHONEEMPTY' | translate)}}</span>
|
||||
<span *ngIf="human?.phone?.isPhoneVerified" class="contact-state verified">{{'USER.PHONEVERIFIED' |
|
||||
translate}}</span>
|
||||
<div *ngIf="human.phone?.phone && !human?.phone?.isPhoneVerified" class="block">
|
||||
<span class="contact-state notverified">{{'USER.NOTVERIFIED' | translate}}</span>
|
||||
|
||||
<ng-container *ngIf="human?.phone?.phone">
|
||||
<a *ngIf="!disablePhoneCode && canWrite" class="verify cnsl-secondary-text"
|
||||
matTooltip="{{'USER.LOGINMETHODS.ENTERCODE_DESC' | translate}}"
|
||||
(click)="enterCode()">{{'USER.LOGINMETHODS.ENTERCODE' | translate}}</a>
|
||||
<a *ngIf="canWrite" class="verify cnsl-secondary-text"
|
||||
matTooltip="{{'USER.LOGINMETHODS.PHONE.RESEND' | translate}}"
|
||||
(click)="emitPhoneVerification()">{{'USER.LOGINMETHODS.RESENDCODE' | translate}}</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<ng-content select="[phoneAction]"></ng-content>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<button matTooltip="{{'ACTIONS.DELETE' | translate}}" *ngIf="human && human.phone?.phone" color="warn"
|
||||
(click)="emitDeletePhone()" mat-icon-button>
|
||||
<i class="las la-trash"></i>
|
||||
</button>
|
||||
<button matTooltip="{{'ACTIONS.EDIT' | translate}}" [disabled]="!canWrite"
|
||||
(click)="openEditDialog(EditDialogType.PHONE)" mat-icon-button>
|
||||
<i class="las la-pen"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="method-row">
|
||||
<div class="left">
|
||||
<span class="label cnsl-secondary-text">{{ 'USER.PHONE' | translate }}</span>
|
||||
<span class="name">{{human?.phone?.phone ? human.phone?.phone : ('USER.PHONEEMPTY' | translate)}}</span>
|
||||
<span *ngIf="human?.phone?.isPhoneVerified" class="contact-state verified">{{'USER.PHONEVERIFIED' |
|
||||
translate}}</span>
|
||||
<div *ngIf="human.phone?.phone && !human?.phone?.isPhoneVerified" class="block">
|
||||
<span class="contact-state notverified">{{'USER.NOTVERIFIED' | translate}}</span>
|
||||
|
||||
<ng-container *ngIf="human?.phone?.phone">
|
||||
<a *ngIf="!disablePhoneCode && canWrite" class="verify cnsl-secondary-text"
|
||||
matTooltip="{{'USER.LOGINMETHODS.ENTERCODE_DESC' | translate}}"
|
||||
(click)="enterCode()">{{'USER.LOGINMETHODS.ENTERCODE' | translate}}</a>
|
||||
<a *ngIf="canWrite" class="verify cnsl-secondary-text"
|
||||
matTooltip="{{'USER.LOGINMETHODS.PHONE.RESEND' | translate}}"
|
||||
(click)="emitPhoneVerification()">{{'USER.LOGINMETHODS.RESENDCODE' | translate}}</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<ng-content select="[phoneAction]"></ng-content>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<button matTooltip="{{'ACTIONS.DELETE' | translate}}" *ngIf="human && human.phone?.phone" color="warn"
|
||||
(click)="emitDeletePhone()" mat-icon-button>
|
||||
<i class="las la-trash"></i>
|
||||
</button>
|
||||
<button matTooltip="{{'ACTIONS.EDIT' | translate}}" [disabled]="!canWrite"
|
||||
(click)="openEditDialog(EditDialogType.PHONE)" mat-icon-button>
|
||||
<i class="las la-pen"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,74 +1,84 @@
|
||||
.method-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: -0.5rem;
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
.method-row {
|
||||
@mixin contact-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
$background: map-get($theme, background);
|
||||
$is-dark-theme: map-get($theme, is-dark);
|
||||
$warn: map-get($theme, warn);
|
||||
$warn-color: map-get($warn, default);
|
||||
|
||||
.contact-method-col {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.5rem;
|
||||
padding-right: 0;
|
||||
border-bottom: 1px solid #ffffff20;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
margin: -0.5rem;
|
||||
|
||||
.left {
|
||||
.label {
|
||||
font-size: 13px;
|
||||
margin-bottom: 0.5rem;
|
||||
min-width: 100px;
|
||||
display: block;
|
||||
}
|
||||
.contact-method-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.5rem;
|
||||
padding-right: 0;
|
||||
border-bottom: 1px solid #ffffff20;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.name {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.contact-state {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
&.verified {
|
||||
color: #85d996;
|
||||
.left {
|
||||
.label {
|
||||
font-size: 13px;
|
||||
margin-bottom: 0.5rem;
|
||||
min-width: 100px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&.notverified {
|
||||
color: var(--warn);
|
||||
margin-right: 1rem;
|
||||
.name {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.contact-state {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
&.verified {
|
||||
color: #85d996;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&.notverified {
|
||||
color: var(--warn);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
.right {
|
||||
flex-basis: 70px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex-basis: 70px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.verified-icon {
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.2rem;
|
||||
height: 1.2rem;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.verified-icon {
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.2rem;
|
||||
height: 1.2rem;
|
||||
cursor: default;
|
||||
}
|
||||
.verify {
|
||||
text-decoration: none;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 0.5rem;
|
||||
cursor: pointer;
|
||||
word-wrap: none;
|
||||
white-space: nowrap;
|
||||
margin-right: 1rem;
|
||||
|
||||
.verify {
|
||||
text-decoration: none;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 0.5rem;
|
||||
cursor: pointer;
|
||||
word-wrap: none;
|
||||
white-space: nowrap;
|
||||
margin-right: 1rem;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
&:hover {
|
||||
color: map-get($foreground, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,12 +38,11 @@ import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.mod
|
||||
import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/localized-date-pipe.module';
|
||||
import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/timestamp-to-date-pipe.module';
|
||||
|
||||
import { HasFeatureModule } from '../../../directives/has-feature/has-feature.module';
|
||||
import { InfoRowModule } from '../../../modules/info-row/info-row.module';
|
||||
import { AuthFactorDialogComponent } from './auth-user-detail/auth-factor-dialog/auth-factor-dialog.component';
|
||||
import { AuthPasswordlessComponent } from './auth-user-detail/auth-passwordless/auth-passwordless.component';
|
||||
import {
|
||||
DialogPasswordlessComponent,
|
||||
DialogPasswordlessComponent,
|
||||
} from './auth-user-detail/auth-passwordless/dialog-passwordless/dialog-passwordless.component';
|
||||
import { AuthUserDetailComponent } from './auth-user-detail/auth-user-detail.component';
|
||||
import { AuthUserMfaComponent } from './auth-user-detail/auth-user-mfa/auth-user-mfa.component';
|
||||
@@ -106,7 +105,6 @@ import { UserMfaComponent } from './user-detail/user-mfa/user-mfa.component';
|
||||
MatIconModule,
|
||||
CardModule,
|
||||
MatProgressSpinnerModule,
|
||||
HasFeatureModule,
|
||||
MatTooltipModule,
|
||||
HasRoleModule,
|
||||
TranslateModule,
|
||||
|
||||
@@ -1,20 +1,36 @@
|
||||
<cnsl-top-view *ngIf="user" title="{{user?.human ? user.human?.profile?.displayName :
|
||||
user?.machine?.name}}" docLink="https://docs.zitadel.ch/docs/guides/basics/projects"
|
||||
sub="{{user?.preferredLoginName}}" [isActive]="user?.state === UserState.USER_STATE_ACTIVE"
|
||||
[isInactive]="user?.state === UserState.USER_STATE_INACTIVE" stateTooltip="{{'USER.STATE.'+user?.state | translate}}"
|
||||
(backClicked)="navigateBack()" [hasActions]="['user.write$', 'user.write:'+user?.id] | hasRole | async">
|
||||
<ng-template topActions cnslHasRole [hasRole]="['user.write$', 'user.write:'+user?.id]">
|
||||
<button mat-menu-item color="warn" *ngIf="user?.state === UserState.USER_STATE_LOCKED"
|
||||
(click)="unlockUser()">{{'USER.PAGES.UNLOCK' |
|
||||
translate}}</button>
|
||||
<button mat-menu-item *ngIf="user?.state === UserState.USER_STATE_ACTIVE"
|
||||
(click)="changeState(UserState.USER_STATE_INACTIVE)">{{'USER.PAGES.DEACTIVATE' |
|
||||
translate}}</button>
|
||||
<button mat-menu-item *ngIf="user?.state === UserState.USER_STATE_INACTIVE"
|
||||
(click)="changeState(UserState.USER_STATE_ACTIVE)">{{'USER.PAGES.REACTIVATE' | translate}}</button>
|
||||
<ng-template cnslHasRole [hasRole]="['user.delete$', 'user.delete:'+user?.id]">
|
||||
<button mat-menu-item matTooltip="{{'USER.PAGES.DELETE' | translate}}" (click)="deleteUser()"><span
|
||||
[style.color]="'var(--warn)'">{{'USER.PAGES.DELETE' | translate}}</span></button>
|
||||
<cnsl-top-view
|
||||
*ngIf="user"
|
||||
title="{{ user?.human ? user.human?.profile?.displayName : user?.machine?.name }}"
|
||||
docLink="https://docs.zitadel.ch/docs/guides/basics/projects"
|
||||
sub="{{ user?.preferredLoginName }}"
|
||||
[isActive]="user?.state === UserState.USER_STATE_ACTIVE"
|
||||
[isInactive]="user?.state === UserState.USER_STATE_INACTIVE"
|
||||
stateTooltip="{{ 'USER.STATE.' + user?.state | translate }}"
|
||||
(backClicked)="navigateBack()"
|
||||
[hasActions]="['user.write$', 'user.write:' + user?.id] | hasRole | async"
|
||||
>
|
||||
<ng-template topActions cnslHasRole [hasRole]="['user.write$', 'user.write:' + user?.id]">
|
||||
<button mat-menu-item color="warn" *ngIf="user?.state === UserState.USER_STATE_LOCKED" (click)="unlockUser()">
|
||||
{{ 'USER.PAGES.UNLOCK' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="user?.state === UserState.USER_STATE_ACTIVE"
|
||||
(click)="changeState(UserState.USER_STATE_INACTIVE)"
|
||||
>
|
||||
{{ 'USER.PAGES.DEACTIVATE' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="user?.state === UserState.USER_STATE_INACTIVE"
|
||||
(click)="changeState(UserState.USER_STATE_ACTIVE)"
|
||||
>
|
||||
{{ 'USER.PAGES.REACTIVATE' | translate }}
|
||||
</button>
|
||||
<ng-template cnslHasRole [hasRole]="['user.delete$', 'user.delete:' + user?.id]">
|
||||
<button mat-menu-item matTooltip="{{ 'USER.PAGES.DELETE' | translate }}" (click)="deleteUser()">
|
||||
<span [style.color]="'var(--warn)'">{{ 'USER.PAGES.DELETE' | translate }}</span>
|
||||
</button>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
<cnsl-info-row topContent *ngIf="user" [user]="user"></cnsl-info-row>
|
||||
@@ -26,48 +42,83 @@
|
||||
|
||||
<p class="no-user-error" *ngIf="!loading && !user">{{ 'USER.PAGES.NOUSER' | translate }}</p>
|
||||
|
||||
<div class="max-width-container" *ngIf="user && (['user.write$','user.write:' + user.id] | hasRole) as canWrite$">
|
||||
<div class="max-width-container" *ngIf="user && (['user.write$', 'user.write:' + user.id] | hasRole) as canWrite$">
|
||||
<cnsl-meta-layout>
|
||||
<cnsl-sidenav [(ngModel)]="currentSetting" [settingsList]="settingsList">
|
||||
<div *ngIf="error" class="max-width-container">
|
||||
<p>{{error}}</p>
|
||||
<p>{{ error }}</p>
|
||||
</div>
|
||||
|
||||
<div class="max-width-container">
|
||||
<cnsl-info-section class="locked" *ngIf="user?.state === UserState.USER_STATE_LOCKED"
|
||||
[type]="InfoSectionType.WARN">
|
||||
{{'USER.PAGES.LOCKEDDESCRIPTION' | translate}}</cnsl-info-section>
|
||||
<cnsl-info-section class="locked" *ngIf="user?.state === UserState.USER_STATE_LOCKED" [type]="InfoSectionType.WARN">
|
||||
{{ 'USER.PAGES.LOCKEDDESCRIPTION' | translate }}</cnsl-info-section
|
||||
>
|
||||
<span *ngIf="!loading && !user">{{ 'USER.PAGES.NOUSER' | translate }}</span>
|
||||
|
||||
<ng-container *ngIf="currentSetting === 'general'">
|
||||
<ng-template cnslHasRole [hasRole]="['user.read$', 'user.read:'+user?.id]">
|
||||
<ng-template cnslHasRole [hasRole]="['user.read$', 'user.read:' + user?.id]">
|
||||
<cnsl-card *ngIf="user.human" title="{{ 'USER.PROFILE.TITLE' | translate }}">
|
||||
<cnsl-detail-form [preferredLoginName]="user.preferredLoginName"
|
||||
[disabled]="(canWrite$ | async) === false" [genders]="genders" [languages]="languages"
|
||||
[username]="user.userName" [user]="user.human" (submitData)="saveProfile($event)"
|
||||
(changeUsernameClicked)="changeUsername()">
|
||||
<cnsl-detail-form
|
||||
[preferredLoginName]="user.preferredLoginName"
|
||||
[disabled]="(canWrite$ | async) === false"
|
||||
[genders]="genders"
|
||||
[languages]="languages"
|
||||
[username]="user.userName"
|
||||
[user]="user.human"
|
||||
(submitData)="saveProfile($event)"
|
||||
(changeUsernameClicked)="changeUsername()"
|
||||
>
|
||||
</cnsl-detail-form>
|
||||
</cnsl-card>
|
||||
|
||||
<cnsl-card *ngIf="user.human" title="{{ 'USER.LOGINMETHODS.TITLE' | translate }}"
|
||||
description="{{ 'USER.LOGINMETHODS.DESCRIPTION' | translate }}">
|
||||
<button card-actions class="icon-button" mat-icon-button (click)="refreshUser()"
|
||||
matTooltip="{{'ACTIONS.REFRESH' | translate}}">
|
||||
<cnsl-card
|
||||
*ngIf="user.human"
|
||||
title="{{ 'USER.LOGINMETHODS.TITLE' | translate }}"
|
||||
description="{{ 'USER.LOGINMETHODS.DESCRIPTION' | translate }}"
|
||||
>
|
||||
<button
|
||||
card-actions
|
||||
class="icon-button"
|
||||
mat-icon-button
|
||||
(click)="refreshUser()"
|
||||
matTooltip="{{ 'ACTIONS.REFRESH' | translate }}"
|
||||
>
|
||||
<mat-icon class="icon">refresh</mat-icon>
|
||||
</button>
|
||||
<cnsl-contact [disablePhoneCode]="true" [state]="user.state"
|
||||
[canWrite]="(['user.write:' + user?.id, 'user.write$'] | hasRole | async)" *ngIf="user?.human"
|
||||
[human]="user.human" (editType)="openEditDialog($event)" (deletedPhone)="deletePhone()"
|
||||
<cnsl-contact
|
||||
[disablePhoneCode]="true"
|
||||
[state]="user.state"
|
||||
[canWrite]="['user.write:' + user?.id, 'user.write$'] | hasRole | async"
|
||||
*ngIf="user?.human"
|
||||
[human]="user.human"
|
||||
(editType)="openEditDialog($event)"
|
||||
(deletedPhone)="deletePhone()"
|
||||
(resendEmailVerification)="resendEmailVerification()"
|
||||
(resendPhoneVerification)="resendPhoneVerification()">
|
||||
<button pwdAction [disabled]="(canWrite$ | async) === false" (click)="sendSetPasswordNotification()"
|
||||
mat-stroked-button color="primary"
|
||||
*ngIf="user.state !== UserState.USER_STATE_LOCKED && user.state !== UserState.USER_STATE_INACTIVE && user.state !== UserState.USER_STATE_INITIAL">{{
|
||||
'USER.PASSWORD.RESENDNOTIFICATION' | translate }}</button>
|
||||
<button emailAction [disabled]="(canWrite$ | async) === false" class="resendemail"
|
||||
*ngIf="user.state === UserState.USER_STATE_INITIAL" mat-stroked-button color="primary"
|
||||
(click)="resendInitEmail()">{{'USER.RESENDINITIALEMAIL' |
|
||||
translate}}</button>
|
||||
(resendPhoneVerification)="resendPhoneVerification()"
|
||||
>
|
||||
<button
|
||||
pwdAction
|
||||
[disabled]="(canWrite$ | async) === false"
|
||||
(click)="sendSetPasswordNotification()"
|
||||
mat-stroked-button
|
||||
*ngIf="
|
||||
user.state !== UserState.USER_STATE_LOCKED &&
|
||||
user.state !== UserState.USER_STATE_INACTIVE &&
|
||||
user.state !== UserState.USER_STATE_INITIAL
|
||||
"
|
||||
>
|
||||
{{ 'USER.PASSWORD.RESENDNOTIFICATION' | translate }}
|
||||
</button>
|
||||
<button
|
||||
emailAction
|
||||
[disabled]="(canWrite$ | async) === false"
|
||||
class="resendemail"
|
||||
*ngIf="user.state === UserState.USER_STATE_INITIAL"
|
||||
mat-stroked-button
|
||||
(click)="resendInitEmail()"
|
||||
>
|
||||
{{ 'USER.RESENDINITIALEMAIL' | translate }}
|
||||
</button>
|
||||
</cnsl-contact>
|
||||
</cnsl-card>
|
||||
</ng-template>
|
||||
@@ -80,25 +131,35 @@
|
||||
|
||||
<ng-container *ngIf="currentSetting && currentSetting === 'general'">
|
||||
<cnsl-card *ngIf="user.machine" title="{{ 'USER.MACHINE.TITLE' | translate }}">
|
||||
<cnsl-detail-form-machine [disabled]="(canWrite$ | async) === false" [username]="user.userName"
|
||||
[user]="user.machine" (submitData)="saveMachine($event)">
|
||||
<cnsl-detail-form-machine
|
||||
[disabled]="(canWrite$ | async) === false"
|
||||
[username]="user.userName"
|
||||
[user]="user.machine"
|
||||
(submitData)="saveMachine($event)"
|
||||
>
|
||||
</cnsl-detail-form-machine>
|
||||
</cnsl-card>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentSetting && currentSetting === 'pat'">
|
||||
<ng-template cnslHasRole [hasRole]="['user.read$', 'user.read:'+user?.id]">
|
||||
<cnsl-card *ngIf="user.machine && user.id" title="{{ 'USER.MACHINE.TOKENSTITLE' | translate }}"
|
||||
description="{{ 'USER.MACHINE.TOKENSDESC' | translate }}">
|
||||
<ng-template cnslHasRole [hasRole]="['user.read$', 'user.read:' + user?.id]">
|
||||
<cnsl-card
|
||||
*ngIf="user.machine && user.id"
|
||||
title="{{ 'USER.MACHINE.TOKENSTITLE' | translate }}"
|
||||
description="{{ 'USER.MACHINE.TOKENSDESC' | translate }}"
|
||||
>
|
||||
<cnsl-personal-access-tokens [userId]="user.id"></cnsl-personal-access-tokens>
|
||||
</cnsl-card>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentSetting && currentSetting === 'keys'">
|
||||
<ng-template cnslHasRole [hasRole]="['user.read$', 'user.read:'+user?.id]">
|
||||
<cnsl-card *ngIf="user.machine && user.id" title="{{ 'USER.MACHINE.KEYSTITLE' | translate }}"
|
||||
description="{{ 'USER.MACHINE.KEYSDESC' | translate }}">
|
||||
<ng-template cnslHasRole [hasRole]="['user.read$', 'user.read:' + user?.id]">
|
||||
<cnsl-card
|
||||
*ngIf="user.machine && user.id"
|
||||
title="{{ 'USER.MACHINE.KEYSTITLE' | translate }}"
|
||||
description="{{ 'USER.MACHINE.KEYSDESC' | translate }}"
|
||||
>
|
||||
<cnsl-machine-keys [userId]="user.id"></cnsl-machine-keys>
|
||||
</cnsl-card>
|
||||
</ng-template>
|
||||
@@ -114,34 +175,40 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentSetting && currentSetting === 'grants'">
|
||||
<cnsl-card *ngIf="user?.id" title="{{ 'GRANTS.USER.TITLE' | translate }}"
|
||||
description="{{'GRANTS.USER.DESCRIPTION' | translate }}">
|
||||
<cnsl-user-grants [userId]="user.id" [context]="USERGRANTCONTEXT"
|
||||
[displayedColumns]="['select', 'projectId', 'creationDate','changeDate', 'roleNamesList', 'actions']"
|
||||
[disableWrite]="((['user.grant.write$'] | hasRole) | async) === false"
|
||||
[disableDelete]="((['user.grant.delete$'] | hasRole) | async) === false">
|
||||
<cnsl-card
|
||||
*ngIf="user?.id"
|
||||
title="{{ 'GRANTS.USER.TITLE' | translate }}"
|
||||
description="{{ 'GRANTS.USER.DESCRIPTION' | translate }}"
|
||||
>
|
||||
<cnsl-user-grants
|
||||
[userId]="user.id"
|
||||
[context]="USERGRANTCONTEXT"
|
||||
[displayedColumns]="['select', 'projectId', 'creationDate', 'changeDate', 'roleNamesList', 'actions']"
|
||||
[disableWrite]="(['user.grant.write$'] | hasRole | async) === false"
|
||||
[disableDelete]="(['user.grant.delete$'] | hasRole | async) === false"
|
||||
>
|
||||
</cnsl-user-grants>
|
||||
</cnsl-card>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentSetting && currentSetting === 'memberships'">
|
||||
<cnsl-card *ngIf="user?.id" title="{{ 'USER.MEMBERSHIPS.TITLE' | translate }}"
|
||||
description="{{'USER.MEMBERSHIPS.DESCRIPTION' | translate }}">
|
||||
<cnsl-card
|
||||
*ngIf="user?.id"
|
||||
title="{{ 'USER.MEMBERSHIPS.TITLE' | translate }}"
|
||||
description="{{ 'USER.MEMBERSHIPS.DESCRIPTION' | translate }}"
|
||||
>
|
||||
<cnsl-memberships-table [userId]="user.id"></cnsl-memberships-table>
|
||||
</cnsl-card>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentSetting && currentSetting === 'metadata'">
|
||||
<ng-template cnslHasFeature [hasFeature]="['metadata.user']">
|
||||
<cnsl-metadata *ngIf="user" [userId]="user.id"></cnsl-metadata>
|
||||
</ng-template>
|
||||
<cnsl-metadata *ngIf="user" [userId]="user.id"></cnsl-metadata>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
</cnsl-sidenav>
|
||||
<div metainfo>
|
||||
<cnsl-changes class="changes" [refresh]="refreshChanges$" [changeType]="ChangeType.USER" [id]="user.id">
|
||||
</cnsl-changes>
|
||||
</div>
|
||||
</cnsl-meta-layout>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user