mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 19:57:22 +00:00
fix(console): move org domains into settings page of the organization (#6612)
* fix: hide domains settings for unauthorized users * refine sidenav object mapping * move domains to settings * change docs * set anchor to list element * remove canwrite check in ngif --------- Co-authored-by: Miguel A. C <doncicuto@gmail.com>
This commit is contained in:
parent
eb31c2a3be
commit
d01f4d229f
@ -158,14 +158,6 @@ const routes: Routes = [
|
|||||||
requiresAll: true,
|
requiresAll: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'domains',
|
|
||||||
loadChildren: () => import('./pages/domains/domains.module'),
|
|
||||||
canActivate: [AuthGuard, RoleGuard],
|
|
||||||
data: {
|
|
||||||
roles: ['org.read'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'org-settings',
|
path: 'org-settings',
|
||||||
loadChildren: () => import('./pages/org-settings/org-settings.module'),
|
loadChildren: () => import('./pages/org-settings/org-settings.module'),
|
||||||
|
67
console/src/app/modules/domains/domains.component.html
Normal file
67
console/src/app/modules/domains/domains.component.html
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<ng-container *ngIf="['org.write$'] | hasRole as canwrite$">
|
||||||
|
<div class="domain-top-view">
|
||||||
|
<div>
|
||||||
|
<div class="domain-title-row">
|
||||||
|
<h2>{{ 'ORG.DOMAINS.TITLE' | translate }}</h2>
|
||||||
|
<a
|
||||||
|
mat-icon-button
|
||||||
|
href="https://zitadel.com/docs/guides/manage/console/organizations#how-zitadel-handles-usernames"
|
||||||
|
rel="noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<i class="las la-info-circle"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<p class="desc cnsl-secondary-text">{{ 'ORG.DOMAINS.DESCRIPTION' | translate }}</p>
|
||||||
|
</div>
|
||||||
|
<span class="fill-space"></span>
|
||||||
|
|
||||||
|
<button
|
||||||
|
[disabled]="(canwrite$ | async) === false"
|
||||||
|
matTooltip="Add domain"
|
||||||
|
mat-raised-button
|
||||||
|
color="primary"
|
||||||
|
class="cnsl-action-button"
|
||||||
|
(click)="addNewDomain()"
|
||||||
|
>
|
||||||
|
<mat-icon>add</mat-icon>
|
||||||
|
<span>{{ 'ACTIONS.NEW' | translate }}</span>
|
||||||
|
<cnsl-action-keys (actionTriggered)="addNewDomain()"> </cnsl-action-keys>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<cnsl-card *ngFor="let domain of domains" class="domain-card">
|
||||||
|
<div class="domain">
|
||||||
|
<span class="title">{{ domain.domainName }}</span>
|
||||||
|
|
||||||
|
<i matTooltip="verified" *ngIf="domain.isVerified" class="verified las la-check-circle"></i>
|
||||||
|
<i matTooltip="primary" *ngIf="domain.isPrimary" class="primary las la-star"></i>
|
||||||
|
<a
|
||||||
|
*ngIf="domain.isVerified && !domain.isPrimary && (canwrite$ | async)"
|
||||||
|
class="primaryset"
|
||||||
|
(click)="setPrimary(domain)"
|
||||||
|
>{{ 'ORG.DOMAINS.SETPRIMARY' | translate }}</a
|
||||||
|
>
|
||||||
|
|
||||||
|
<span class="fill-space"></span>
|
||||||
|
<button
|
||||||
|
mat-icon-button
|
||||||
|
[disabled]="(canwrite$ | async) === false || domain.isVerified"
|
||||||
|
*ngIf="verifyOrgDomains"
|
||||||
|
(click)="verifyDomain(domain)"
|
||||||
|
>
|
||||||
|
<i class="las la-pen"></i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="domain-rem-button"
|
||||||
|
[disabled]="(canwrite$ | async) === false || domain.isPrimary"
|
||||||
|
matTooltip="Remove domain"
|
||||||
|
color="warn"
|
||||||
|
mat-icon-button
|
||||||
|
(click)="removeDomain(domain.domainName)"
|
||||||
|
>
|
||||||
|
<i class="las la-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</cnsl-card>
|
||||||
|
</ng-container>
|
@ -1,7 +1,6 @@
|
|||||||
.domain-top-view {
|
.domain-top-view {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 2rem;
|
|
||||||
|
|
||||||
.domain-title-row {
|
.domain-title-row {
|
||||||
display: flex;
|
display: flex;
|
@ -14,13 +14,11 @@ import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.mod
|
|||||||
|
|
||||||
import { AddDomainDialogModule } from './add-domain-dialog/add-domain-dialog.module';
|
import { AddDomainDialogModule } from './add-domain-dialog/add-domain-dialog.module';
|
||||||
import { DomainVerificationComponent } from './domain-verification/domain-verification.component';
|
import { DomainVerificationComponent } from './domain-verification/domain-verification.component';
|
||||||
import { DomainsRoutingModule } from './domains-routing.module';
|
|
||||||
import { DomainsComponent } from './domains.component';
|
import { DomainsComponent } from './domains.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [DomainsComponent, DomainVerificationComponent],
|
declarations: [DomainsComponent, DomainVerificationComponent],
|
||||||
imports: [
|
imports: [
|
||||||
DomainsRoutingModule,
|
|
||||||
AddDomainDialogModule,
|
AddDomainDialogModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
@ -36,5 +34,6 @@ import { DomainsComponent } from './domains.component';
|
|||||||
InfoSectionModule,
|
InfoSectionModule,
|
||||||
MatProgressSpinnerModule,
|
MatProgressSpinnerModule,
|
||||||
],
|
],
|
||||||
|
exports: [DomainsComponent],
|
||||||
})
|
})
|
||||||
export default class DomainsModule {}
|
export default class DomainsModule {}
|
@ -177,17 +177,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template cnslHasRole [hasRole]="['org.read']">
|
|
||||||
<a
|
|
||||||
class="nav-item"
|
|
||||||
[routerLinkActive]="['active']"
|
|
||||||
[routerLink]="['/domains']"
|
|
||||||
[routerLinkActiveOptions]="{ exact: true }"
|
|
||||||
>
|
|
||||||
<span class="label">{{ 'MENU.DOMAINS' | translate }}</span>
|
|
||||||
</a>
|
|
||||||
</ng-template>
|
|
||||||
|
|
||||||
<ng-template cnslHasRole [hasRole]="['org.read']">
|
<ng-template cnslHasRole [hasRole]="['org.read']">
|
||||||
<a
|
<a
|
||||||
class="nav-item"
|
class="nav-item"
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<h2>{{ 'POLICY.DOMAIN_POLICY.TITLE' | translate }}</h2>
|
<h2>{{ 'POLICY.DOMAIN_POLICY.TITLE' | translate }}</h2>
|
||||||
<cnsl-info-section *ngIf="isDefault"> {{ 'POLICY.DEFAULTLABEL' | translate }}</cnsl-info-section>
|
<cnsl-info-section *ngIf="isDefault"> {{ 'POLICY.DEFAULTLABEL' | translate }}</cnsl-info-section>
|
||||||
|
|
||||||
<!-- <ng-template cnslHasRole [hasRole]="['domain.policy.delete']"> -->
|
|
||||||
<button
|
<button
|
||||||
*ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault"
|
*ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault"
|
||||||
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
||||||
@ -26,7 +25,6 @@
|
|||||||
>
|
>
|
||||||
{{ 'POLICY.RESET' | translate }}
|
{{ 'POLICY.RESET' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<!-- </ng-template> -->
|
|
||||||
|
|
||||||
<div class="domain-policy-content" *ngIf="domainData">
|
<div class="domain-policy-content" *ngIf="domainData">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
<ng-container *ngIf="currentSetting === 'login'">
|
<ng-container *ngIf="currentSetting === 'login'">
|
||||||
<cnsl-login-policy [serviceType]="serviceType"></cnsl-login-policy>
|
<cnsl-login-policy [serviceType]="serviceType"></cnsl-login-policy>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<ng-container *ngIf="currentSetting === 'verified_domains'">
|
||||||
|
<cnsl-domains></cnsl-domains>
|
||||||
|
</ng-container>
|
||||||
<ng-container *ngIf="currentSetting === 'domain' && (['iam.policy.write'] | hasRole | async) === true">
|
<ng-container *ngIf="currentSetting === 'domain' && (['iam.policy.write'] | hasRole | async) === true">
|
||||||
<cnsl-domain-policy [serviceType]="serviceType"></cnsl-domain-policy>
|
<cnsl-domain-policy [serviceType]="serviceType"></cnsl-domain-policy>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -5,6 +5,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module';
|
import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module';
|
||||||
|
|
||||||
import { CardModule } from '../card/card.module';
|
import { CardModule } from '../card/card.module';
|
||||||
|
import DomainsModule from '../domains/domains.module';
|
||||||
import { DomainPolicyModule } from '../policies/domain-policy/domain-policy.module';
|
import { DomainPolicyModule } from '../policies/domain-policy/domain-policy.module';
|
||||||
import { GeneralSettingsModule } from '../policies/general-settings/general-settings.module';
|
import { GeneralSettingsModule } from '../policies/general-settings/general-settings.module';
|
||||||
import { IdpSettingsModule } from '../policies/idp-settings/idp-settings.module';
|
import { IdpSettingsModule } from '../policies/idp-settings/idp-settings.module';
|
||||||
@ -40,6 +41,7 @@ import { SettingsListComponent } from './settings-list.component';
|
|||||||
PrivacyPolicyModule,
|
PrivacyPolicyModule,
|
||||||
MessageTextsPolicyModule,
|
MessageTextsPolicyModule,
|
||||||
SecurityPolicyModule,
|
SecurityPolicyModule,
|
||||||
|
DomainsModule,
|
||||||
LoginTextsPolicyModule,
|
LoginTextsPolicyModule,
|
||||||
DomainPolicyModule,
|
DomainPolicyModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
|
@ -43,6 +43,15 @@ export const LOGIN: SidenavSetting = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const VERIFIED_DOMAINS: SidenavSetting = {
|
||||||
|
id: 'verified_domains',
|
||||||
|
i18nKey: 'SETTINGS.LIST.VERIFIED_DOMAINS',
|
||||||
|
groupI18nKey: 'SETTINGS.GROUPS.DOMAIN',
|
||||||
|
requiredRoles: {
|
||||||
|
[PolicyComponentServiceType.MGMT]: ['org.read'],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export const DOMAIN: SidenavSetting = {
|
export const DOMAIN: SidenavSetting = {
|
||||||
id: 'domain',
|
id: 'domain',
|
||||||
i18nKey: 'SETTINGS.LIST.DOMAIN',
|
i18nKey: 'SETTINGS.LIST.DOMAIN',
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
|
||||||
|
|
||||||
import { DomainsComponent } from './domains.component';
|
|
||||||
|
|
||||||
const routes: Routes = [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: DomainsComponent,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [RouterModule.forChild(routes)],
|
|
||||||
exports: [RouterModule],
|
|
||||||
})
|
|
||||||
export class DomainsRoutingModule {}
|
|
@ -1,69 +0,0 @@
|
|||||||
<div class="max-width-container">
|
|
||||||
<ng-container *ngIf="['org.write$'] | hasRole as canwrite$">
|
|
||||||
<div class="domain-top-view">
|
|
||||||
<div>
|
|
||||||
<div class="domain-title-row">
|
|
||||||
<h1>{{ 'ORG.DOMAINS.TITLE' | translate }}</h1>
|
|
||||||
<a
|
|
||||||
mat-icon-button
|
|
||||||
href="https://zitadel.com/docs/guides/manage/console/organizations#how-zitadel-handles-usernames"
|
|
||||||
rel="noreferrer"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
<i class="las la-info-circle"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<p class="desc cnsl-secondary-text">{{ 'ORG.DOMAINS.DESCRIPTION' | translate }}</p>
|
|
||||||
</div>
|
|
||||||
<span class="fill-space"></span>
|
|
||||||
|
|
||||||
<button
|
|
||||||
[disabled]="(canwrite$ | async) === false"
|
|
||||||
matTooltip="Add domain"
|
|
||||||
mat-raised-button
|
|
||||||
color="primary"
|
|
||||||
class="cnsl-action-button"
|
|
||||||
(click)="addNewDomain()"
|
|
||||||
>
|
|
||||||
<mat-icon>add</mat-icon>
|
|
||||||
<span>{{ 'ACTIONS.NEW' | translate }}</span>
|
|
||||||
<cnsl-action-keys (actionTriggered)="addNewDomain()"> </cnsl-action-keys>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<cnsl-card *ngFor="let domain of domains" class="domain-card">
|
|
||||||
<div class="domain">
|
|
||||||
<span class="title">{{ domain.domainName }}</span>
|
|
||||||
|
|
||||||
<i matTooltip="verified" *ngIf="domain.isVerified" class="verified las la-check-circle"></i>
|
|
||||||
<i matTooltip="primary" *ngIf="domain.isPrimary" class="primary las la-star"></i>
|
|
||||||
<a
|
|
||||||
*ngIf="domain.isVerified && !domain.isPrimary && (canwrite$ | async)"
|
|
||||||
class="primaryset"
|
|
||||||
(click)="setPrimary(domain)"
|
|
||||||
>{{ 'ORG.DOMAINS.SETPRIMARY' | translate }}</a
|
|
||||||
>
|
|
||||||
|
|
||||||
<span class="fill-space"></span>
|
|
||||||
<button
|
|
||||||
mat-icon-button
|
|
||||||
[disabled]="(canwrite$ | async) === false || domain.isVerified"
|
|
||||||
*ngIf="(canwrite$ | async) && verifyOrgDomains"
|
|
||||||
(click)="verifyDomain(domain)"
|
|
||||||
>
|
|
||||||
<i class="las la-pen"></i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="domain-rem-button"
|
|
||||||
[disabled]="(canwrite$ | async) === false || domain.isPrimary"
|
|
||||||
matTooltip="Remove domain"
|
|
||||||
color="warn"
|
|
||||||
mat-icon-button
|
|
||||||
(click)="removeDomain(domain.domainName)"
|
|
||||||
>
|
|
||||||
<i class="las la-trash"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</cnsl-card>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
|
@ -8,9 +8,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<span class="fill-space"></span>
|
<span class="fill-space"></span>
|
||||||
</div>
|
</div>
|
||||||
<cnsl-settings-list
|
<ng-container *ngIf="settingsList | async as list">
|
||||||
[selectedId]="id"
|
<cnsl-settings-list
|
||||||
[serviceType]="PolicyComponentServiceType.ADMIN"
|
[selectedId]="id"
|
||||||
[settingsList]="settingsList"
|
[serviceType]="PolicyComponentServiceType.ADMIN"
|
||||||
></cnsl-settings-list>
|
[settingsList]="list"
|
||||||
|
></cnsl-settings-list>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute, Params } from '@angular/router';
|
import { ActivatedRoute, Params } from '@angular/router';
|
||||||
import { Subject, takeUntil } from 'rxjs';
|
import { Observable, of, Subject, takeUntil } from 'rxjs';
|
||||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||||
import { SidenavSetting } from 'src/app/modules/sidenav/sidenav.component';
|
import { SidenavSetting } from 'src/app/modules/sidenav/sidenav.component';
|
||||||
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
||||||
@ -22,7 +22,6 @@ import {
|
|||||||
SECRETS,
|
SECRETS,
|
||||||
SECURITY,
|
SECURITY,
|
||||||
} from '../../modules/settings-list/settings';
|
} from '../../modules/settings-list/settings';
|
||||||
import { checkSettingsPermissions } from '../org-settings/org-settings.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cnsl-instance-settings',
|
selector: 'cnsl-instance-settings',
|
||||||
@ -55,7 +54,7 @@ export class InstanceSettingsComponent implements OnInit, OnDestroy {
|
|||||||
SECURITY,
|
SECURITY,
|
||||||
];
|
];
|
||||||
|
|
||||||
public settingsList: SidenavSetting[] = [];
|
public settingsList: Observable<SidenavSetting[]> = of([]);
|
||||||
|
|
||||||
private destroy$: Subject<void> = new Subject();
|
private destroy$: Subject<void> = new Subject();
|
||||||
constructor(
|
constructor(
|
||||||
@ -81,13 +80,7 @@ export class InstanceSettingsComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
checkSettingsPermissions(this.defaultSettingsList, PolicyComponentServiceType.ADMIN, this.authService).subscribe(
|
this.settingsList = this.authService.isAllowedMapper(this.defaultSettingsList, (setting) => setting.requiredRoles.admin);
|
||||||
(allowed) => {
|
|
||||||
this.settingsList = this.defaultSettingsList.filter((setting, index) => {
|
|
||||||
return allowed[index];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<span class="fill-space"></span>
|
<span class="fill-space"></span>
|
||||||
</div>
|
</div>
|
||||||
<cnsl-settings-list
|
<ng-container *ngIf="settingsList | async as list">
|
||||||
[selectedId]="id"
|
<cnsl-settings-list
|
||||||
[serviceType]="PolicyComponentServiceType.MGMT"
|
[selectedId]="id"
|
||||||
[settingsList]="settingsList"
|
[serviceType]="PolicyComponentServiceType.MGMT"
|
||||||
></cnsl-settings-list>
|
[settingsList]="list"
|
||||||
|
></cnsl-settings-list>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute, Params } from '@angular/router';
|
import { ActivatedRoute, Params } from '@angular/router';
|
||||||
import { forkJoin, of, take } from 'rxjs';
|
import { Observable, of, take } from 'rxjs';
|
||||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||||
import { SidenavSetting } from 'src/app/modules/sidenav/sidenav.component';
|
import { SidenavSetting } from 'src/app/modules/sidenav/sidenav.component';
|
||||||
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
||||||
@ -17,6 +17,7 @@ import {
|
|||||||
MESSAGETEXTS,
|
MESSAGETEXTS,
|
||||||
NOTIFICATION_POLICY,
|
NOTIFICATION_POLICY,
|
||||||
PRIVACYPOLICY,
|
PRIVACYPOLICY,
|
||||||
|
VERIFIED_DOMAINS,
|
||||||
} from '../../modules/settings-list/settings';
|
} from '../../modules/settings-list/settings';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -34,6 +35,7 @@ export class OrgSettingsComponent implements OnInit {
|
|||||||
COMPLEXITY,
|
COMPLEXITY,
|
||||||
LOCKOUT,
|
LOCKOUT,
|
||||||
NOTIFICATION_POLICY,
|
NOTIFICATION_POLICY,
|
||||||
|
VERIFIED_DOMAINS,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
BRANDING,
|
BRANDING,
|
||||||
MESSAGETEXTS,
|
MESSAGETEXTS,
|
||||||
@ -41,7 +43,7 @@ export class OrgSettingsComponent implements OnInit {
|
|||||||
PRIVACYPOLICY,
|
PRIVACYPOLICY,
|
||||||
];
|
];
|
||||||
|
|
||||||
public settingsList: SidenavSetting[] = [];
|
public settingsList: Observable<Array<SidenavSetting>> = of([]);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
breadcrumbService: BreadcrumbService,
|
breadcrumbService: BreadcrumbService,
|
||||||
@ -65,40 +67,8 @@ export class OrgSettingsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
checkSettingsPermissions(this.defaultSettingsList, PolicyComponentServiceType.MGMT, this.authService).subscribe(
|
this.settingsList = this.authService
|
||||||
(allowed) => {
|
.isAllowedMapper(this.defaultSettingsList, (setting) => setting.requiredRoles.mgmt)
|
||||||
this.settingsList = this.defaultSettingsList.filter((setting, index) => {
|
.pipe(take(1));
|
||||||
return allowed[index];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return a Observables<boolean>[] that will wait till all service calls are finished to then check if user is allowed to see a setting
|
|
||||||
export function checkSettingsPermissions(settings: SidenavSetting[], serviceType: string, authService: GrpcAuthService) {
|
|
||||||
return forkJoin(
|
|
||||||
settings
|
|
||||||
.filter((setting) => {
|
|
||||||
if (serviceType === PolicyComponentServiceType.ADMIN) {
|
|
||||||
return setting.requiredRoles && setting.requiredRoles.admin;
|
|
||||||
} else {
|
|
||||||
return setting.requiredRoles && setting.requiredRoles.mgmt;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.map((setting) => {
|
|
||||||
if (!setting.requiredRoles) {
|
|
||||||
return of(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!setting.requiredRoles.mgmt) {
|
|
||||||
return of(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (setting.requiredRoles.mgmt) {
|
|
||||||
return authService.isAllowed(setting.requiredRoles.mgmt).pipe(take(1));
|
|
||||||
}
|
|
||||||
return of(false);
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
@ -309,10 +309,7 @@ export class GrpcAuthService {
|
|||||||
filter(([hL, p]) => {
|
filter(([hL, p]) => {
|
||||||
return hL === true && !!p.length;
|
return hL === true && !!p.length;
|
||||||
}),
|
}),
|
||||||
map(([_, zroles]) => {
|
map(([_, zroles]) => this.hasRoles(zroles, roles, requiresAll)),
|
||||||
const what = this.hasRoles(zroles, roles, requiresAll);
|
|
||||||
return what;
|
|
||||||
}),
|
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -320,6 +317,31 @@ export class GrpcAuthService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* filters objects based on roles
|
||||||
|
* @param objects array of objects
|
||||||
|
* @param mapper mapping function which maps to a string[] or Regexp[] of roles
|
||||||
|
* @param requiresAll wheter all, or just a single roles is required to fulfill
|
||||||
|
*/
|
||||||
|
public isAllowedMapper<T>(
|
||||||
|
objects: T[],
|
||||||
|
mapper: (attr: any) => string[] | RegExp[],
|
||||||
|
requiresAll: boolean = false,
|
||||||
|
): Observable<T[]> {
|
||||||
|
return this.fetchedZitadelPermissions.pipe(
|
||||||
|
withLatestFrom(this.zitadelPermissions),
|
||||||
|
filter(([hL, p]) => {
|
||||||
|
return hL === true && !!p.length;
|
||||||
|
}),
|
||||||
|
map(([_, zroles]) => {
|
||||||
|
return objects.filter((obj) => {
|
||||||
|
const roles = mapper(obj);
|
||||||
|
return this.hasRoles(zroles, roles, requiresAll);
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns true if user has one of the provided roles
|
* returns true if user has one of the provided roles
|
||||||
* @param userRoles roles of the user
|
* @param userRoles roles of the user
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Събития",
|
"EVENTS": "Събития",
|
||||||
"FAILEDEVENTS": "Неуспешни събития",
|
"FAILEDEVENTS": "Неуспешни събития",
|
||||||
"ORGANIZATION": "Организация",
|
"ORGANIZATION": "Организация",
|
||||||
"DOMAINS": "Домейни",
|
|
||||||
"PROJECT": "Проекти",
|
"PROJECT": "Проекти",
|
||||||
"PROJECTOVERVIEW": "Преглед",
|
"PROJECTOVERVIEW": "Преглед",
|
||||||
"PROJECTGRANTS": "Грантове",
|
"PROJECTGRANTS": "Грантове",
|
||||||
@ -947,7 +946,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Добавете домейн",
|
"NEW": "Добавете домейн",
|
||||||
"TITLE": "Домейни",
|
"TITLE": "Проверени домейни",
|
||||||
"DESCRIPTION": "Конфигурирайте вашите домейни. ",
|
"DESCRIPTION": "Конфигурирайте вашите домейни. ",
|
||||||
"SETPRIMARY": "Задайте като основен",
|
"SETPRIMARY": "Задайте като основен",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1017,6 +1016,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "Настройки за SMTP и SMS",
|
"NOTIFICATIONS_DESC": "Настройки за SMTP и SMS",
|
||||||
"MESSAGETEXTS": "Текстове на съобщения",
|
"MESSAGETEXTS": "Текстове на съобщения",
|
||||||
"IDP": "Доставчици на идентичност",
|
"IDP": "Доставчици на идентичност",
|
||||||
|
"VERIFIED_DOMAINS": "Проверени домейни",
|
||||||
"DOMAIN": "Настройки на домейна",
|
"DOMAIN": "Настройки на домейна",
|
||||||
"LOGINTEXTS": "Текстове на интерфейса за влизане",
|
"LOGINTEXTS": "Текстове на интерфейса за влизане",
|
||||||
"BRANDING": "Брандиране",
|
"BRANDING": "Брандиране",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Events",
|
"EVENTS": "Events",
|
||||||
"FAILEDEVENTS": "Fehlerhafte Events",
|
"FAILEDEVENTS": "Fehlerhafte Events",
|
||||||
"ORGANIZATION": "Organisation",
|
"ORGANIZATION": "Organisation",
|
||||||
"DOMAINS": "Domänen",
|
|
||||||
"PROJECT": "Projekte",
|
"PROJECT": "Projekte",
|
||||||
"PROJECTOVERVIEW": "Übersicht",
|
"PROJECTOVERVIEW": "Übersicht",
|
||||||
"PROJECTGRANTS": "Berechtigte Organisationen",
|
"PROJECTGRANTS": "Berechtigte Organisationen",
|
||||||
@ -953,7 +952,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Domain hinzufügen",
|
"NEW": "Domain hinzufügen",
|
||||||
"TITLE": "Domänen",
|
"TITLE": "Verifizierte Domains",
|
||||||
"DESCRIPTION": "Konfiguriere die Domains, die für Domain discovery und als Suffix für die Benutzer verwendet werden können.",
|
"DESCRIPTION": "Konfiguriere die Domains, die für Domain discovery und als Suffix für die Benutzer verwendet werden können.",
|
||||||
"SETPRIMARY": "Primäre Domain setzen",
|
"SETPRIMARY": "Primäre Domain setzen",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1023,6 +1022,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "SMTP und SMS Einstellungen",
|
"NOTIFICATIONS_DESC": "SMTP und SMS Einstellungen",
|
||||||
"MESSAGETEXTS": "Benachrichtigungstexte",
|
"MESSAGETEXTS": "Benachrichtigungstexte",
|
||||||
"IDP": "Identitätsanbieter",
|
"IDP": "Identitätsanbieter",
|
||||||
|
"VERIFIED_DOMAINS": "Verifizierte Domains",
|
||||||
"DOMAIN": "Domain Einstellungen",
|
"DOMAIN": "Domain Einstellungen",
|
||||||
"LOGINTEXTS": "Login Interface Texte",
|
"LOGINTEXTS": "Login Interface Texte",
|
||||||
"BRANDING": "Branding",
|
"BRANDING": "Branding",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Events",
|
"EVENTS": "Events",
|
||||||
"FAILEDEVENTS": "Failed Events",
|
"FAILEDEVENTS": "Failed Events",
|
||||||
"ORGANIZATION": "Organization",
|
"ORGANIZATION": "Organization",
|
||||||
"DOMAINS": "Domains",
|
|
||||||
"PROJECT": "Projects",
|
"PROJECT": "Projects",
|
||||||
"PROJECTOVERVIEW": "Overview",
|
"PROJECTOVERVIEW": "Overview",
|
||||||
"PROJECTGRANTS": "Grants",
|
"PROJECTGRANTS": "Grants",
|
||||||
@ -954,7 +953,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Add Domain",
|
"NEW": "Add Domain",
|
||||||
"TITLE": "Domains",
|
"TITLE": "Verified domains",
|
||||||
"DESCRIPTION": "Configure your organization domains. This domain can be used for domain discovery and username suffixing.",
|
"DESCRIPTION": "Configure your organization domains. This domain can be used for domain discovery and username suffixing.",
|
||||||
"SETPRIMARY": "Set as Primary",
|
"SETPRIMARY": "Set as Primary",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1024,6 +1023,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "SMTP and SMS Settings",
|
"NOTIFICATIONS_DESC": "SMTP and SMS Settings",
|
||||||
"MESSAGETEXTS": "Message Texts",
|
"MESSAGETEXTS": "Message Texts",
|
||||||
"IDP": "Identity Providers",
|
"IDP": "Identity Providers",
|
||||||
|
"VERIFIED_DOMAINS": "Verified domains",
|
||||||
"DOMAIN": "Domain settings",
|
"DOMAIN": "Domain settings",
|
||||||
"LOGINTEXTS": "Login Interface Texts",
|
"LOGINTEXTS": "Login Interface Texts",
|
||||||
"BRANDING": "Branding",
|
"BRANDING": "Branding",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Eventos",
|
"EVENTS": "Eventos",
|
||||||
"FAILEDEVENTS": "Eventos fallidos",
|
"FAILEDEVENTS": "Eventos fallidos",
|
||||||
"ORGANIZATION": "Organización",
|
"ORGANIZATION": "Organización",
|
||||||
"DOMAINS": "Dominios",
|
|
||||||
"PROJECT": "Proyectos",
|
"PROJECT": "Proyectos",
|
||||||
"PROJECTOVERVIEW": "Resumen",
|
"PROJECTOVERVIEW": "Resumen",
|
||||||
"PROJECTGRANTS": "Concesiones",
|
"PROJECTGRANTS": "Concesiones",
|
||||||
@ -954,7 +953,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Añadir dominio",
|
"NEW": "Añadir dominio",
|
||||||
"TITLE": "Dominios",
|
"TITLE": "Dominios verificados",
|
||||||
"DESCRIPTION": "Configura tus dominios. Este dominio puede usarse para iniciar sesión con tus usuarios.",
|
"DESCRIPTION": "Configura tus dominios. Este dominio puede usarse para iniciar sesión con tus usuarios.",
|
||||||
"SETPRIMARY": "Establecer como primario",
|
"SETPRIMARY": "Establecer como primario",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1024,6 +1023,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "Ajustes SMTP y SMS",
|
"NOTIFICATIONS_DESC": "Ajustes SMTP y SMS",
|
||||||
"MESSAGETEXTS": "Mensajes de texto",
|
"MESSAGETEXTS": "Mensajes de texto",
|
||||||
"IDP": "Proveedores de identidad",
|
"IDP": "Proveedores de identidad",
|
||||||
|
"VERIFIED_DOMAINS": "Dominios verificados",
|
||||||
"DOMAIN": "Ajustes de dominio",
|
"DOMAIN": "Ajustes de dominio",
|
||||||
"LOGINTEXTS": "Textos de interfaz de inicio de sesión",
|
"LOGINTEXTS": "Textos de interfaz de inicio de sesión",
|
||||||
"BRANDING": "Imagen de marca",
|
"BRANDING": "Imagen de marca",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Événements",
|
"EVENTS": "Événements",
|
||||||
"FAILEDEVENTS": "Événements échoués",
|
"FAILEDEVENTS": "Événements échoués",
|
||||||
"ORGANIZATION": "Organisation",
|
"ORGANIZATION": "Organisation",
|
||||||
"DOMAINS": "Domaines",
|
|
||||||
"PROJECT": "Projets",
|
"PROJECT": "Projets",
|
||||||
"PROJECTOVERVIEW": "Vue d'ensemble",
|
"PROJECTOVERVIEW": "Vue d'ensemble",
|
||||||
"PROJECTGRANTS": "Subventions",
|
"PROJECTGRANTS": "Subventions",
|
||||||
@ -953,7 +952,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Ajouter un domaine",
|
"NEW": "Ajouter un domaine",
|
||||||
"TITLE": "Domaines",
|
"TITLE": "Domaines vérifiés",
|
||||||
"DESCRIPTION": "Configurez vos domaines. Ce domaine peut être utilisé pour se connecter avec vos utilisateurs.",
|
"DESCRIPTION": "Configurez vos domaines. Ce domaine peut être utilisé pour se connecter avec vos utilisateurs.",
|
||||||
"SETPRIMARY": "Définir comme primaire",
|
"SETPRIMARY": "Définir comme primaire",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1023,6 +1022,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "Paramètres SMTP et SMS",
|
"NOTIFICATIONS_DESC": "Paramètres SMTP et SMS",
|
||||||
"MESSAGETEXTS": "Textes des messages",
|
"MESSAGETEXTS": "Textes des messages",
|
||||||
"IDP": "Fournisseurs d'identité",
|
"IDP": "Fournisseurs d'identité",
|
||||||
|
"VERIFIED_DAMAINS": "Domaines vérifiés",
|
||||||
"DOMAIN": "Paramètres du domaine",
|
"DOMAIN": "Paramètres du domaine",
|
||||||
"LOGINTEXTS": "Textes de l'interface de connexion",
|
"LOGINTEXTS": "Textes de l'interface de connexion",
|
||||||
"BRANDING": "Image de marque",
|
"BRANDING": "Image de marque",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Eventi",
|
"EVENTS": "Eventi",
|
||||||
"FAILEDEVENTS": "Eventi falliti",
|
"FAILEDEVENTS": "Eventi falliti",
|
||||||
"ORGANIZATION": "Organizzazione",
|
"ORGANIZATION": "Organizzazione",
|
||||||
"DOMAINS": "Domini",
|
|
||||||
"PROJECT": "Progetti",
|
"PROJECT": "Progetti",
|
||||||
"PROJECTOVERVIEW": "Progetto",
|
"PROJECTOVERVIEW": "Progetto",
|
||||||
"PROJECTGRANTS": "Organizzazioni ammissibili",
|
"PROJECTGRANTS": "Organizzazioni ammissibili",
|
||||||
@ -953,7 +952,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Aggiungi dominio",
|
"NEW": "Aggiungi dominio",
|
||||||
"TITLE": "Domini",
|
"TITLE": "Domini verificati",
|
||||||
"DESCRIPTION": "Configura i tuoi domini. Questo dominio pu\u00f2 essere utilizzato per accedere con i tuoi utenti.",
|
"DESCRIPTION": "Configura i tuoi domini. Questo dominio pu\u00f2 essere utilizzato per accedere con i tuoi utenti.",
|
||||||
"SETPRIMARY": "Impostato come primario",
|
"SETPRIMARY": "Impostato come primario",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1023,6 +1022,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "Impostazioni SMTP e SMS",
|
"NOTIFICATIONS_DESC": "Impostazioni SMTP e SMS",
|
||||||
"MESSAGETEXTS": "Testi di notifica",
|
"MESSAGETEXTS": "Testi di notifica",
|
||||||
"IDP": "Fornitori di identità",
|
"IDP": "Fornitori di identità",
|
||||||
|
"VERIFIED_DAMAINS": "Domini verificati",
|
||||||
"DOMAIN": "Impostazioni del dominio",
|
"DOMAIN": "Impostazioni del dominio",
|
||||||
"LOGINTEXTS": "Testi dell'interfaccia login",
|
"LOGINTEXTS": "Testi dell'interfaccia login",
|
||||||
"BRANDING": "Branding",
|
"BRANDING": "Branding",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "イベント",
|
"EVENTS": "イベント",
|
||||||
"FAILEDEVENTS": "失敗したイベント",
|
"FAILEDEVENTS": "失敗したイベント",
|
||||||
"ORGANIZATION": "組織",
|
"ORGANIZATION": "組織",
|
||||||
"DOMAINS": "ドメイン",
|
|
||||||
"PROJECT": "プロジェクト",
|
"PROJECT": "プロジェクト",
|
||||||
"PROJECTOVERVIEW": "概要",
|
"PROJECTOVERVIEW": "概要",
|
||||||
"PROJECTGRANTS": "グラント",
|
"PROJECTGRANTS": "グラント",
|
||||||
@ -954,7 +953,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "ドメインを追加する",
|
"NEW": "ドメインを追加する",
|
||||||
"TITLE": "ドメイン",
|
"TITLE": "検証済みドメイン",
|
||||||
"DESCRIPTION": "ドメインを設定します。このドメインは、ユーザーのログインで使用できます。",
|
"DESCRIPTION": "ドメインを設定します。このドメインは、ユーザーのログインで使用できます。",
|
||||||
"SETPRIMARY": "プライマリとして設定する",
|
"SETPRIMARY": "プライマリとして設定する",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1024,6 +1023,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "SMTPおよびSMS設定",
|
"NOTIFICATIONS_DESC": "SMTPおよびSMS設定",
|
||||||
"MESSAGETEXTS": "メッセージテキスト",
|
"MESSAGETEXTS": "メッセージテキスト",
|
||||||
"IDP": "IDプロバイダー",
|
"IDP": "IDプロバイダー",
|
||||||
|
"VERIFIED_DAMAINS": "検証済みドメイン",
|
||||||
"DOMAIN": "ドメイン設定",
|
"DOMAIN": "ドメイン設定",
|
||||||
"LOGINTEXTS": "ログイン画面のテキスト",
|
"LOGINTEXTS": "ログイン画面のテキスト",
|
||||||
"BRANDING": "ブランディング",
|
"BRANDING": "ブランディング",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Настани",
|
"EVENTS": "Настани",
|
||||||
"FAILEDEVENTS": "Неуспешни настани",
|
"FAILEDEVENTS": "Неуспешни настани",
|
||||||
"ORGANIZATION": "Организација",
|
"ORGANIZATION": "Организација",
|
||||||
"DOMAINS": "Домени",
|
|
||||||
"PROJECT": "Проекти",
|
"PROJECT": "Проекти",
|
||||||
"PROJECTOVERVIEW": "Преглед",
|
"PROJECTOVERVIEW": "Преглед",
|
||||||
"PROJECTGRANTS": "Овластувања",
|
"PROJECTGRANTS": "Овластувања",
|
||||||
@ -954,7 +953,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Додади домен",
|
"NEW": "Додади домен",
|
||||||
"TITLE": "Домени",
|
"TITLE": "Потврдени домени",
|
||||||
"DESCRIPTION": "Конфигурирајте ги вашите домени. Овој домен може да се користи за најава на вашите корисници.",
|
"DESCRIPTION": "Конфигурирајте ги вашите домени. Овој домен може да се користи за најава на вашите корисници.",
|
||||||
"SETPRIMARY": "Постави како основен",
|
"SETPRIMARY": "Постави како основен",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1025,6 +1024,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "Подесувања за SMTP и SMS",
|
"NOTIFICATIONS_DESC": "Подесувања за SMTP и SMS",
|
||||||
"MESSAGETEXTS": "Текстови на пораки",
|
"MESSAGETEXTS": "Текстови на пораки",
|
||||||
"IDP": "Identity Providers",
|
"IDP": "Identity Providers",
|
||||||
|
"VERIFIED_DAMAINS": "Потврдени домени",
|
||||||
"DOMAIN": "Подесувања за домен",
|
"DOMAIN": "Подесувања за домен",
|
||||||
"LOGINTEXTS": "Текстови на интерфејс за најава",
|
"LOGINTEXTS": "Текстови на интерфејс за најава",
|
||||||
"BRANDING": "Брендирање",
|
"BRANDING": "Брендирање",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Zdarzenia",
|
"EVENTS": "Zdarzenia",
|
||||||
"FAILEDEVENTS": "Nieudane Zdarzenia",
|
"FAILEDEVENTS": "Nieudane Zdarzenia",
|
||||||
"ORGANIZATION": "Organizacja",
|
"ORGANIZATION": "Organizacja",
|
||||||
"DOMAINS": "Domeny",
|
|
||||||
"PROJECT": "Projekty",
|
"PROJECT": "Projekty",
|
||||||
"PROJECTOVERVIEW": "Przegląd",
|
"PROJECTOVERVIEW": "Przegląd",
|
||||||
"PROJECTGRANTS": "Uprawnienia",
|
"PROJECTGRANTS": "Uprawnienia",
|
||||||
@ -953,7 +952,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Dodaj domenę",
|
"NEW": "Dodaj domenę",
|
||||||
"TITLE": "Domeny",
|
"TITLE": "Zweryfikowane domeny",
|
||||||
"DESCRIPTION": "Skonfiguruj swoje domeny. Ta domena może być używana do logowania się z Twoimi użytkownikami.",
|
"DESCRIPTION": "Skonfiguruj swoje domeny. Ta domena może być używana do logowania się z Twoimi użytkownikami.",
|
||||||
"SETPRIMARY": "Ustaw jako główną",
|
"SETPRIMARY": "Ustaw jako główną",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1023,6 +1022,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "Ustawienia SMTP i SMS",
|
"NOTIFICATIONS_DESC": "Ustawienia SMTP i SMS",
|
||||||
"MESSAGETEXTS": "Teksty wiadomości",
|
"MESSAGETEXTS": "Teksty wiadomości",
|
||||||
"IDP": "Dostawcy tożsamości",
|
"IDP": "Dostawcy tożsamości",
|
||||||
|
"VERIFIED_DAMAINS": "Zweryfikowane domeny",
|
||||||
"DOMAIN": "Ustawienia domeny",
|
"DOMAIN": "Ustawienia domeny",
|
||||||
"LOGINTEXTS": "Teksty interfejsu logowania",
|
"LOGINTEXTS": "Teksty interfejsu logowania",
|
||||||
"BRANDING": "Marka",
|
"BRANDING": "Marka",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "Eventos",
|
"EVENTS": "Eventos",
|
||||||
"FAILEDEVENTS": "Eventos com Falha",
|
"FAILEDEVENTS": "Eventos com Falha",
|
||||||
"ORGANIZATION": "Organização",
|
"ORGANIZATION": "Organização",
|
||||||
"DOMAINS": "Domínios",
|
|
||||||
"PROJECT": "Projetos",
|
"PROJECT": "Projetos",
|
||||||
"PROJECTOVERVIEW": "Visão Geral",
|
"PROJECTOVERVIEW": "Visão Geral",
|
||||||
"PROJECTGRANTS": "Autorizações",
|
"PROJECTGRANTS": "Autorizações",
|
||||||
@ -954,7 +953,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "Adicionar Domínio",
|
"NEW": "Adicionar Domínio",
|
||||||
"TITLE": "Domínios",
|
"TITLE": "Domínios verificados",
|
||||||
"DESCRIPTION": "Configure seus domínios. Este domínio pode ser usado para o login dos seus usuários.",
|
"DESCRIPTION": "Configure seus domínios. Este domínio pode ser usado para o login dos seus usuários.",
|
||||||
"SETPRIMARY": "Definir como Principal",
|
"SETPRIMARY": "Definir como Principal",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1025,6 +1024,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "Configurações de SMTP e SMS",
|
"NOTIFICATIONS_DESC": "Configurações de SMTP e SMS",
|
||||||
"MESSAGETEXTS": "Textos de Mensagem",
|
"MESSAGETEXTS": "Textos de Mensagem",
|
||||||
"IDP": "Provedores de Identidade",
|
"IDP": "Provedores de Identidade",
|
||||||
|
"VERIFIED_DAMAINS": "Domínios verificados",
|
||||||
"DOMAIN": "Configurações de Domínio",
|
"DOMAIN": "Configurações de Domínio",
|
||||||
"LOGINTEXTS": "Textos da Interface de Login",
|
"LOGINTEXTS": "Textos da Interface de Login",
|
||||||
"BRANDING": "Marca",
|
"BRANDING": "Marca",
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"EVENTS": "活动",
|
"EVENTS": "活动",
|
||||||
"FAILEDEVENTS": "失败事件",
|
"FAILEDEVENTS": "失败事件",
|
||||||
"ORGANIZATION": "组织",
|
"ORGANIZATION": "组织",
|
||||||
"DOMAINS": "域名",
|
|
||||||
"PROJECT": "项目",
|
"PROJECT": "项目",
|
||||||
"PROJECTOVERVIEW": "概览",
|
"PROJECTOVERVIEW": "概览",
|
||||||
"PROJECTGRANTS": "授予",
|
"PROJECTGRANTS": "授予",
|
||||||
@ -953,7 +952,7 @@
|
|||||||
},
|
},
|
||||||
"DOMAINS": {
|
"DOMAINS": {
|
||||||
"NEW": "添加域名",
|
"NEW": "添加域名",
|
||||||
"TITLE": "域名",
|
"TITLE": "已验证的域名",
|
||||||
"DESCRIPTION": "配置您的域名。此域名可用于您的用户登录。",
|
"DESCRIPTION": "配置您的域名。此域名可用于您的用户登录。",
|
||||||
"SETPRIMARY": "设置为主域名",
|
"SETPRIMARY": "设置为主域名",
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
@ -1023,6 +1022,7 @@
|
|||||||
"NOTIFICATIONS_DESC": "SMTP 和 SMS 设置",
|
"NOTIFICATIONS_DESC": "SMTP 和 SMS 设置",
|
||||||
"MESSAGETEXTS": "消息文本",
|
"MESSAGETEXTS": "消息文本",
|
||||||
"IDP": "身份提供者",
|
"IDP": "身份提供者",
|
||||||
|
"VERIFIED_DAMAINS": "已验证的域名",
|
||||||
"DOMAIN": "域名设置",
|
"DOMAIN": "域名设置",
|
||||||
"LOGINTEXTS": "登录界面文本",
|
"LOGINTEXTS": "登录界面文本",
|
||||||
"BRANDING": "品牌标识",
|
"BRANDING": "品牌标识",
|
||||||
|
@ -72,14 +72,12 @@ Please note that domain verification also removes the logonname from all users,
|
|||||||
You can also disable domain verification with DNS challenge in the [instance settings](/docs/guides/manage/console/instance-settings#domain-settings).
|
You can also disable domain verification with DNS challenge in the [instance settings](/docs/guides/manage/console/instance-settings#domain-settings).
|
||||||
:::
|
:::
|
||||||
|
|
||||||
1. Browse to your organization
|
1. Browse to your organization settings
|
||||||
2. Click **Add Domain**
|
2. Select the menu entry **Verified domains**
|
||||||
3. To start the domain verification click the domain name and a dialog will appear, where you can choose between DNS or HTTP challenge methods.
|
3. To start the domain verification click the domain name and a dialog will appear, where you can choose between DNS or HTTP challenge methods.
|
||||||
4. For example, create a TXT record with your DNS provider for the used domain and click verify. ZITADEL will then proceed and check your DNS.
|
4. For example, create a TXT record with your DNS provider for the used domain and click verify. ZITADEL will then proceed and check your DNS.
|
||||||
5. When the verification is successful you have the option to activate the domain by clicking **Set as primary**
|
5. When the verification is successful you have the option to activate the domain by clicking **Set as primary**
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
Do not delete the verification code, as ZITADEL will re-check the ownership of your domain from time to time
|
Do not delete the verification code, as ZITADEL will re-check the ownership of your domain from time to time
|
||||||
:::
|
:::
|
||||||
@ -95,6 +93,7 @@ Those settings are the same as on your instance.
|
|||||||
- [**Identity Providers**](./instance-settings#identity-providers): Define IDPs which are available for all organizations
|
- [**Identity Providers**](./instance-settings#identity-providers): Define IDPs which are available for all organizations
|
||||||
- [**Password Complexity**](./instance-settings#password-complexity): Requirements for Passwords ex. Symbols, Numbers, min length and more.
|
- [**Password Complexity**](./instance-settings#password-complexity): Requirements for Passwords ex. Symbols, Numbers, min length and more.
|
||||||
- [**Lockout**](./instance-settings#lockout): Set the maximum attempts a user can try to enter the password. When the number is exceeded, the user gets locked out and has to be unlocked.
|
- [**Lockout**](./instance-settings#lockout): Set the maximum attempts a user can try to enter the password. When the number is exceeded, the user gets locked out and has to be unlocked.
|
||||||
|
- [**Verified domains**](/docs/guides/manage/console/organizations#verify-your-domain-name): This is where you manage your organization specific domains which can be used to build usernames
|
||||||
- [**Domain settings**](./instance-settings#domain-settings): Whether users use their email or the generated username to login. Other Validation, SMTP settings
|
- [**Domain settings**](./instance-settings#domain-settings): Whether users use their email or the generated username to login. Other Validation, SMTP settings
|
||||||
- [**Branding**](./instance-settings#branding): Appearance of the login interface.
|
- [**Branding**](./instance-settings#branding): Appearance of the login interface.
|
||||||
- [**Message Texts**](./instance-settings#message-texts): Text and internationalization for emails
|
- [**Message Texts**](./instance-settings#message-texts): Text and internationalization for emails
|
||||||
@ -105,20 +104,19 @@ If you need custom branding on a organization (for example in a B2B scenario, wh
|
|||||||
|
|
||||||
The behaviour of the login page, applyling custom design, is then defined on your projects detail page. Read more about it [here](./projects#branding)
|
The behaviour of the login page, applyling custom design, is then defined on your projects detail page. Read more about it [here](./projects#branding)
|
||||||
|
|
||||||
|
|
||||||
## Show Organization Login
|
## Show Organization Login
|
||||||
|
|
||||||
As you should know by now ZITADEL knows the concept of Organizations.
|
As you should know by now ZITADEL knows the concept of Organizations.
|
||||||
You can define [default settings](/docs/guides/manage/console/instance-settings) for your ZITADEL, or you can overwrite them for an [Organization](#organization-settings).
|
You can define [default settings](/docs/guides/manage/console/instance-settings) for your ZITADEL, or you can overwrite them for an [Organization](#organization-settings).
|
||||||
Per default the ZITADEL Login will always show what is defined per default. As soon as the Organization context is given, the settings defined on the specific organization can be triggered.
|
Per default the ZITADEL Login will always show what is defined per default. As soon as the Organization context is given, the settings defined on the specific organization can be triggered.
|
||||||
This means when you want to trigger the settings of an organization directly, make sure to send the organization scope in the authentication request.
|
This means when you want to trigger the settings of an organization directly, make sure to send the organization scope in the authentication request.
|
||||||
``` bash
|
|
||||||
|
```bash
|
||||||
urn:zitadel:iam:org:id:{id}
|
urn:zitadel:iam:org:id:{id}
|
||||||
```
|
```
|
||||||
|
|
||||||
Read more about the [scopes](/docs/apis/openidoauth/scopes#reserved-scopes) or try it out in our [OIDC Playground](/docs/apis/openidoauth/authrequest).
|
Read more about the [scopes](/docs/apis/openidoauth/scopes#reserved-scopes) or try it out in our [OIDC Playground](/docs/apis/openidoauth/authrequest).
|
||||||
|
|
||||||
|
|
||||||
## Default organization
|
## Default organization
|
||||||
|
|
||||||
On the instance settings page ($YOUR_DOMAIN//ui/console/orgs) you can set an organization as default organization.
|
On the instance settings page ($YOUR_DOMAIN//ui/console/orgs) you can set an organization as default organization.
|
||||||
|
@ -88,7 +88,7 @@ Make sure to [Force MFA](/docs/guides/manage/console/instance-settings#multifact
|
|||||||
|
|
||||||
### Verify domains
|
### Verify domains
|
||||||
|
|
||||||
Switch to the organization **Alpha** and select the tab "Domains".
|
Switch to the organization **Alpha** and navigate to the settings and "Verified domains".
|
||||||
Verify the domain alpha.com following the [organization guide](/docs/guides/manage/console/organizations#domain-verification-and-primary-domain).
|
Verify the domain alpha.com following the [organization guide](/docs/guides/manage/console/organizations#domain-verification-and-primary-domain).
|
||||||
|
|
||||||
Do the same for the **Beta** organization.
|
Do the same for the **Beta** organization.
|
||||||
@ -101,7 +101,7 @@ You can also disable domain verification with acme challenge in the [instance se
|
|||||||
|
|
||||||
You should be all setup to try out domain discovery.
|
You should be all setup to try out domain discovery.
|
||||||
|
|
||||||
The user journeys for the different users would look as follows:
|
The user journeys for the different users would look as follows:
|
||||||
|
|
||||||
- User (Alice, Bob, Chuck) clicks a login button in your application
|
- User (Alice, Bob, Chuck) clicks a login button in your application
|
||||||
- Redirected to `login.mycompany.com` (ZITADEL running under a custom domain)
|
- Redirected to `login.mycompany.com` (ZITADEL running under a custom domain)
|
||||||
|
BIN
docs/static/img/change-email.gif
vendored
BIN
docs/static/img/change-email.gif
vendored
Binary file not shown.
Before Width: | Height: | Size: 11 MiB |
BIN
docs/static/img/console_verify_domain.gif
vendored
BIN
docs/static/img/console_verify_domain.gif
vendored
Binary file not shown.
Before Width: | Height: | Size: 20 MiB |
Loading…
x
Reference in New Issue
Block a user