mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
* start with user * user first try done in all services * user, org, idp for discussion * remove unused stuff * bla * dockerbuild * rename search, get multiple to list... * add annotation * update proto dependencies * update proto dependencies * change proto imports * replace all old imports * fix go out * remove unused lines * correct protoc flags * grpc and openapi flags * go out source path relative * -p * remove dead code * sourcepath relative * ls * is onenapi the problem? * hobla * authoption output * wrong field name * gopf * correct option, add correct flags * small improvments * SIMPLYFY * relative path * gopf bin ich en tubel * correct path * default policies in admin * grpc generation in one file * remove non ascii * metadata on manipulations * correct auth_option import * fixes * larry * idp provider to idp * fix generate * admin and auth nearly done * admin and auth nearly done * gen * healthz * imports * deleted too much imports * fix org * add import * imports * import * naming * auth_opt * gopf * management * imports * _TYPE_UNSPECIFIED * improts * auth opts * management policies * imports * passwordlessType to MFAType * auth_opt * add user grant calls * add missing messages * result * fix option * improvements * ids * fix http * imports * fixes * fields * body * add fields * remove wrong member query * fix request response * fixes * add copy files * variable versions * generate all files * improvements * add dependencies * factors * user session * oidc information, iam * remove unused file * changes * enums * dockerfile * fix build * remove unused folder * update readme for build * move old server impl * add event type to change * some changes * start admin * remove wrong field * admin only list calls missing * fix proto numbers * surprisingly it compiles * service ts changes * admin mgmt * mgmt * auth manipulation and gets done, lists missing * validations and some field changes * validations * enum validations * remove todo * move proto files to proto/zitadel * change proto path in dockerfile * it compiles! * add validate import * remove duplicate import * fix protos * fix import * tests * cleanup * remove unimplemented methods * iam member multiple queries * all auth and admin calls * add initial password on crate human * message names * management user server * machine done * fix: todos (#1346) * fix: pub sub in new eventstore * fix: todos * fix: todos * fix: todos * fix: todos * fix: todos * fix tests * fix: search method domain * admin service, user import type typescript * admin changes * admin changes * fix: search method domain * more user grpc and begin org, fix configs * fix: return object details * org grpc * remove creation date add details * app * fix: return object details * fix: return object details * mgmt service, project members * app * fix: convert policies * project, members, granted projects, searches * fix: convert usergrants * fix: convert usergrants * auth user detail, user detail, mfa, second factor, auth * fix: convert usergrants * mfa, memberships, password, owned proj detail * fix: convert usergrants * project grant * missing details * changes, userview * idp table, keys * org list and user table filter * unify rest paths (#1381) * unify rest paths * post for all searches, mfa to multi_factor, secondfactor to second_factor * remove v1 * fix tests * rename api client key to app key * machine keys, age policy * user list, machine keys, changes * fix: org states * add default flag to policy * second factor to type * idp id * app type * unify ListQuery, ListDetails, ObjectDetails field names * user grants, apps, memberships * fix type params * metadata to detail, linke idps * api create, membership, app detail, create * idp, app, policy * queries, multi -> auth factors and missing fields * update converters * provider to user, remove old mgmt refs * temp remove authfactor dialog, build finish Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Fabi <[email protected]> Co-authored-by: Livio Amstutz <[email protected]> Co-authored-by: Fabiennne <[email protected]>
204 lines
12 KiB
HTML
204 lines
12 KiB
HTML
<ng-container *ngIf="(authService.user | async) || {} as user">
|
||
<ng-container *ngIf="((['iam.read$','iam.write$'] | hasRole)) as iamuser$">
|
||
<mat-toolbar class="root-header">
|
||
<button *ngIf="authenticationService.authenticated" aria-label="Toggle sidenav" mat-icon-button
|
||
(click)="drawer.toggle()">
|
||
<i class="icon las la-bars"></i>
|
||
</button>
|
||
<a class="title" [routerLink]="['/']">
|
||
<img class="logo" alt="zitadel logo" *ngIf="componentCssClass == 'dark-theme'; else lighttheme"
|
||
src="../assets/images/zitadel-logo-solo-light.svg" />
|
||
<ng-template #lighttheme>
|
||
<img alt="zitadel logo" class="logo" src="../assets/images/zitadel-logo-solo-dark.svg" />
|
||
</ng-template>
|
||
</a>
|
||
|
||
<svg class="slash" viewBox="0 0 24 24" width="32" height="32" stroke="currentColor" stroke-width="1"
|
||
stroke-linecap="round" stroke-linejoin="round" fill="none" shape-rendering="geometricPrecision">
|
||
<path d="M16.88 3.549L7.12 20.451"></path>
|
||
</svg>
|
||
|
||
<button class="org-button" (click)="loadOrgs()" *ngIf="user && org" mat-button [matMenuTriggerFor]="menu"
|
||
(menuOpened)="focusFilter()">{{org?.name ? org.name : 'NO NAME'}}
|
||
<mat-icon>
|
||
arrow_drop_down</mat-icon>
|
||
</button>
|
||
|
||
<mat-menu class="menu" #menu="matMenu">
|
||
<div class="spinner-w">
|
||
<mat-spinner diameter="20" *ngIf="orgLoading$ | async" color="accent">
|
||
</mat-spinner>
|
||
</div>
|
||
|
||
<div class="filter-wrapper">
|
||
<input cnslInput class="filter-input" [formControl]="filterControl" autocomplete="off"
|
||
(click)="$event.stopPropagation()" placeholder="{{'ORG.PAGES.FILTERPLACEHOLDER' | translate}}"
|
||
#input>
|
||
</div>
|
||
|
||
<div class="org-wrapper">
|
||
<button [ngClass]="{'active': temporg.id === org?.id}" [disabled]="!temporg.id"
|
||
*ngFor="let temporg of orgs$ | async" mat-menu-item (click)="setActiveOrg(temporg)">
|
||
{{temporg?.name ? temporg.name : 'NO NAME'}}
|
||
</button>
|
||
</div>
|
||
|
||
<button class="show-all" mat-menu-item [routerLink]="[ '/org/overview' ]">{{'MENU.SHOWORGS' |
|
||
translate}}</button>
|
||
|
||
<ng-template appHasRole [appHasRole]="['org.create','iam.write']">
|
||
<button mat-menu-item [routerLink]="[ '/org/create' ]">
|
||
<mat-icon class="avatar">add</mat-icon>
|
||
{{'MENU.NEWORG' | translate}}
|
||
</button>
|
||
</ng-template>
|
||
</mat-menu>
|
||
<span class="fill-space"></span>
|
||
|
||
<a class="doc-link" href="https://docs.zitadel.ch" mat-stroked-button target="_blank">{{'MENU.DOCUMENTATION'
|
||
| translate}}</a>
|
||
<div (clickOutside)="closeAccountCard()" class="icon-container">
|
||
<app-avatar *ngIf="user && (user.displayName || (user.firstName && user.lastName))"
|
||
class="avatar dontcloseonclick" (click)="showAccount = !showAccount" [active]="showAccount"
|
||
[name]="user.displayName ? user.displayName : (user.firstName + ' '+ user.lastName)" [size]="38">
|
||
</app-avatar>
|
||
<app-accounts-card @accounts class="a_card mat-elevation-z1" *ngIf="showAccount"
|
||
(close)="showAccount = false" [user]="user" [iamuser]="iamuser$ | async">
|
||
</app-accounts-card>
|
||
</div>
|
||
</mat-toolbar>
|
||
<mat-drawer-container class="main-container">
|
||
<mat-drawer #drawer class="sidenav" [mode]="(isHandset$ | async) ? 'over' : 'side'"
|
||
[opened]="!(isHandset$ | async) && authenticationService.authenticated">
|
||
<div class="side-column">
|
||
<div class="list">
|
||
<a @navitem class="nav-item" [routerLinkActive]="['active']"
|
||
[routerLinkActiveOptions]="{ exact: true }" [routerLink]="['/']">
|
||
<i class="icon las la-home"></i>
|
||
<span class="label">{{ 'MENU.DASHBOARD' | translate }}</span>
|
||
</a>
|
||
|
||
<ng-container *ngIf="authenticationService.authenticationChanged | async">
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.PERSONAL' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLinkActiveOptions]="{ exact: true }"
|
||
[routerLink]="['/users/me']">
|
||
<i class="icon las la-user-circle"></i>
|
||
<span class="label">{{ 'MENU.PERSONAL_INFO' | translate }}</span>
|
||
</a>
|
||
</ng-container>
|
||
|
||
<div *ngIf="org" [@navAnimation]="org">
|
||
<ng-template appHasRole
|
||
[appHasRole]="['org.read', 'project.read(:[0-9]*)?', 'user.read(:[0-9]*)?', 'user.grant.read(:[0-9]*)?']">
|
||
<div @navitem class="divider">
|
||
<div class="line"></div>
|
||
<span>{{org?.name ? org.name : ('MENU.ORGSECTION' | translate)}}</span>
|
||
<div class="hiddenline"></div>
|
||
</div>
|
||
</ng-template>
|
||
|
||
<ng-template appHasRole [appHasRole]="['org.read']">
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.ORG' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLink]="[ '/org']">
|
||
<i class="icon las la-archway"></i>
|
||
<span class="label">{{'MENU.ORGANIZATION' | translate}}</span>
|
||
</a>
|
||
</ng-template>
|
||
|
||
<ng-template appHasRole [appHasRole]="['project.read(:[0-9]*)?']">
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.SELFPROJECTS' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLink]="[ '/projects']">
|
||
<i class="icon las la-layer-group"></i>
|
||
|
||
<div class="c_label">
|
||
<span> {{'MENU.PROJECT' | translate}} </span>
|
||
<span *ngIf="(mgmtService?.ownedProjectsCount | async)"
|
||
class="count">{{mgmtService?.ownedProjectsCount | async}}</span>
|
||
</div>
|
||
</a>
|
||
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.GRANTEDPROJECTS' | translate}}"
|
||
*ngIf="mgmtService?.grantedProjectsCount && (mgmtService?.grantedProjectsCount | async)"
|
||
class="nav-item" [routerLinkActive]="['active']"
|
||
[routerLink]="[ '/granted-projects']">
|
||
<i class="icon las la-layer-group"></i>
|
||
<div class="c_label">
|
||
<span>{{ 'MENU.GRANTEDPROJECT' | translate }}</span>
|
||
<span class="count">{{mgmtService?.grantedProjectsCount | async}}</span>
|
||
</div>
|
||
</a>
|
||
</ng-template>
|
||
|
||
<ng-template appHasRole [appHasRole]="['user.read(:[0-9]*)?']">
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.HUMANUSERS' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLink]="[ '/users/list/humans']"
|
||
[routerLinkActiveOptions]="{ exact: true }">
|
||
<i class="icon las la-user-friends"></i>
|
||
<span class="label">{{ 'MENU.HUMANUSERS' | translate }}</span>
|
||
</a>
|
||
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.MACHINEUSERS' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLink]="[ '/users/list/machines']"
|
||
[routerLinkActiveOptions]="{ exact: true }">
|
||
<i class="icon las la-users-cog"></i>
|
||
<span class="label">{{ 'MENU.MACHINEUSERS' | translate }}</span>
|
||
</a>
|
||
</ng-template>
|
||
|
||
<ng-template appHasRole [appHasRole]="['user.grant.read(:[0-9]*)?']">
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.AUTHZ' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLink]="[ '/grants']"
|
||
[routerLinkActiveOptions]="{ exact: true }">
|
||
<i class="icon las la-shield-alt"></i>
|
||
<span class="label">{{ 'MENU.GRANTS' | translate }}</span>
|
||
</a>
|
||
</ng-template>
|
||
</div>
|
||
|
||
<ng-container *ngIf="iamuser$ | async">
|
||
<div @navitem class="divider">
|
||
<div class="line"></div>
|
||
<span>{{'MENU.ADMINSECTION' | translate}}</span>
|
||
<div class="hiddenline"></div>
|
||
</div>
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.IAMPOLICIES' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLink]="[ '/iam','policies']">
|
||
<i class="icon las la-gem"></i>
|
||
<span class="label">{{'MENU.IAMPOLICIES' | translate}}</span>
|
||
</a>
|
||
|
||
<a @navitem matTooltip="{{'MENU.TOOLTIP.IAMEVENTSTORE' | translate}}" class="nav-item"
|
||
[routerLinkActive]="['active']" [routerLink]="[ '/iam', 'eventstore']">
|
||
<i class="icon las la-gem"></i>
|
||
<span class="label">{{'MENU.IAMEVENTSTORE' | translate}}</span>
|
||
</a>
|
||
</ng-container>
|
||
|
||
<span class="fill-space"></span>
|
||
|
||
<div class="toc-line">
|
||
<a class="toc" href="https://zitadel.ch/pdf/agb.pdf" alt="Terms and Conditions"
|
||
target="_blank">{{'MENU.TOC'
|
||
| translate}}</a>
|
||
<span> </span>
|
||
</div>
|
||
</div>
|
||
<span class="fill-space"></span>
|
||
</div>
|
||
</mat-drawer>
|
||
<mat-drawer-content class="content">
|
||
<div class="router" [@routeAnimations]="prepareRoute(outlet)">
|
||
<router-outlet #outlet="outlet"></router-outlet>
|
||
</div>
|
||
</mat-drawer-content>
|
||
</mat-drawer-container>
|
||
<div @adminline *ngIf="iamuser$ | async" class="admin-line" [ngClass]="{'expanded': !hideAdminWarn}"
|
||
matTooltip="IAM Administrator">
|
||
<button [matTooltip]="!hideAdminWarn ? 'Unpin': 'Pin'" (click)="toggleAdminHide()" mat-icon-button>
|
||
<mat-icon *ngIf="!hideAdminWarn" svgIcon="mdi_pin"></mat-icon>
|
||
<mat-icon *ngIf="hideAdminWarn" svgIcon="mdi_pin_outline"></mat-icon>
|
||
</button>
|
||
<span>{{'MENU.IAMADMIN' | translate}}</span>
|
||
</div>
|
||
</ng-container>
|
||
</ng-container> |