fix(console): dependencies, list my memberships, passwordless texts, privatelabelling issues (#2142)

* fix: list my memberships in console

* show manager context in detail page

* console dependencies (#2161)

* feat: User metadata (#2025)

* feat: user meta data events

* feat: user meta data set tests

* feat: user meta data tests

* feat: user meta data in protos

* feat: user meta data command api

* feat: user meta data query side

* feat: proto correct order, fix handlers

* feat: proto correct order

* feat: fixes of pr comments

* feat: fixes of pr comments

* feat: value as byte array

* feat: metadata feature

* Update internal/auth/repository/eventsourcing/handler/meta_data.go

Co-authored-by: Silvan <silvan.reusser@gmail.com>

* Update internal/command/user_meta_data.go

Co-authored-by: Silvan <silvan.reusser@gmail.com>

* Update proto/zitadel/metadata.proto

Co-authored-by: Silvan <silvan.reusser@gmail.com>

* Update proto/zitadel/metadata.proto

Co-authored-by: Silvan <silvan.reusser@gmail.com>

* fix: rename metadata files and table

* fix: rename meta data to metadat in protos

* Update internal/domain/metadata.go

Co-authored-by: Silvan <silvan.reusser@gmail.com>

* fix: rename vars

* fix: rebiuld docs

* Update internal/iam/repository/view/metadata_view.go

Co-authored-by: Silvan <silvan.reusser@gmail.com>

Co-authored-by: Silvan <silvan.reusser@gmail.com>

* fix(auth): read privacy policy from eventstore if not found (#2125)

* fix(auth): read privacy policy from eventstore if not found

* Update internal/auth/repository/eventsourcing/eventstore/auth_request.go

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>

* chore(deps-dev): bump @angular/cli from 12.1.1 to 12.2.0 in /console (#2149)

Bumps [@angular/cli](https://github.com/angular/angular-cli) from 12.1.1 to 12.2.0.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/v12.1.1...12.2.0)

---
updated-dependencies:
- dependency-name: "@angular/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @angular/material-moment-adapter in /console (#2147)

Bumps [@angular/material-moment-adapter](https://github.com/angular/components) from 12.1.1 to 12.2.0.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.1.1...12.2.0)

---
updated-dependencies:
- dependency-name: "@angular/material-moment-adapter"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ts-node from 9.1.1 to 10.2.0 in /console (#2145)

Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.1.1 to 10.2.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v9.1.1...v10.2.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/jasmine from 3.7.7 to 3.8.2 in /console (#2115)

Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.7.7 to 3.8.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)

---
updated-dependencies:
- dependency-name: "@types/jasmine"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump libphonenumber-js from 1.9.19 to 1.9.23 in /console (#2114)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.9.19 to 1.9.23.
- [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags)
- [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.9.19...v1.9.23)

---
updated-dependencies:
- dependency-name: libphonenumber-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @angular/core and @angular/animations in /console (#2072)

Bumps [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) and [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations). These dependencies needed to be updated together.

Updates `@angular/core` from 12.0.3 to 12.1.3
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/12.1.3/packages/core)

Updates `@angular/animations` from 12.0.3 to 12.1.3
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/12.1.3/packages/animations)

---
updated-dependencies:
- dependency-name: "@angular/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@angular/animations"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump stylelint-config-standard in /console (#2065)

Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 20.0.0 to 22.0.0.
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint-config-standard/compare/20.0.0...22.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @types/google-protobuf in /console (#2000)

Bumps [@types/google-protobuf](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/google-protobuf) from 3.15.2 to 3.15.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/google-protobuf)

---
updated-dependencies:
- dependency-name: "@types/google-protobuf"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* package

* angular core

* update angular core, cdk, allow commonjs deps

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix labelpolicy max size, double trigger, labels

* lint styles

* disable rule, add passwordless message texts

* lint exceeding linelimit

* login texts

* remove duplicate keyname

* rm unused

* fix: read lockout policy

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Max Peintner
2021-08-16 14:44:20 +02:00
committed by GitHub
parent 490d087d45
commit 90f1647bb9
40 changed files with 1970 additions and 996 deletions

View File

@@ -7,6 +7,7 @@
"value-keyword-case": null, "value-keyword-case": null,
"at-rule-no-unknown": null, "at-rule-no-unknown": null,
"no-descending-specificity": null, "no-descending-specificity": null,
"no-invalid-position-at-import-rule": null,
"at-rule-empty-line-before": [ "at-rule-empty-line-before": [
"always", "always",
{ {

View File

@@ -35,6 +35,8 @@
], ],
"allowedCommonJsDependencies": [ "allowedCommonJsDependencies": [
"@angular/common/locales/de", "@angular/common/locales/de",
"src/app/proto/generated/zitadel/admin_pb",
"src/app/proto/generated/zitadel/management_pb",
"src/app/proto/generated/**", "src/app/proto/generated/**",
"file-saver", "file-saver",
"qrcode" "qrcode"

1792
console/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,23 +10,23 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~12.0.3", "@angular/animations": "~12.2.0",
"@angular/cdk": "~12.1.1", "@angular/cdk": "~12.2.0",
"@angular/common": "~12.0.5", "@angular/common": "~12.2.0",
"@angular/compiler": "~12.0.0", "@angular/compiler": "~12.2.0",
"@angular/core": "~12.0.0", "@angular/core": "~12.2.0",
"@angular/forms": "~12.0.5", "@angular/forms": "~12.2.0",
"@angular/material": "^12.1.1", "@angular/material": "^12.1.1",
"@angular/material-moment-adapter": "^12.1.1", "@angular/material-moment-adapter": "^12.2.0",
"@angular/platform-browser": "~12.0.0", "@angular/platform-browser": "~12.2.0",
"@angular/platform-browser-dynamic": "~12.0.5", "@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.0.5", "@angular/router": "~12.2.0",
"@angular/service-worker": "~12.0.5", "@angular/service-worker": "~12.2.0",
"@grpc/grpc-js": "^1.3.2", "@grpc/grpc-js": "^1.3.2",
"@ngx-translate/core": "^13.0.0", "@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0", "@ngx-translate/http-loader": "^6.0.0",
"@types/file-saver": "^2.0.2", "@types/file-saver": "^2.0.2",
"@types/google-protobuf": "^3.7.4", "@types/google-protobuf": "^3.15.3",
"@types/uuid": "^8.3.0", "@types/uuid": "^8.3.0",
"angular-oauth2-oidc": "^10.0.3", "angular-oauth2-oidc": "^10.0.3",
"angularx-qrcode": "^11.0.0", "angularx-qrcode": "^11.0.0",
@@ -35,7 +35,7 @@
"google-proto-files": "^2.4.0", "google-proto-files": "^2.4.0",
"google-protobuf": "^3.17.2", "google-protobuf": "^3.17.2",
"grpc-web": "^1.2.1", "grpc-web": "^1.2.1",
"libphonenumber-js": "^1.9.16", "libphonenumber-js": "^1.9.23",
"moment": "^2.29.1", "moment": "^2.29.1",
"ngx-color": "^7.2.0", "ngx-color": "^7.2.0",
"ngx-image-cropper": "^3.3.5", "ngx-image-cropper": "^3.3.5",
@@ -49,11 +49,11 @@
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~12.1.1", "@angular-devkit/build-angular": "~12.1.1",
"@angular/cli": "~12.1.1", "@angular/cli": "~12.2.0",
"@angular/compiler-cli": "~12.0.5", "@angular/compiler-cli": "~12.2.0",
"@angular/language-service": "~12.1.0", "@angular/language-service": "~12.2.0",
"@types/jasmine": "~3.7.7", "@types/jasmine": "~3.8.2",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.10",
"@types/node": "^15.12.1", "@types/node": "^15.12.1",
"codelyzer": "^6.0.0", "codelyzer": "^6.0.0",
"jasmine-core": "~3.7.1", "jasmine-core": "~3.7.1",
@@ -66,9 +66,9 @@
"prettier": "^2.3.1", "prettier": "^2.3.1",
"protractor": "~7.0.0", "protractor": "~7.0.0",
"stylelint": "^13.10.0", "stylelint": "^13.10.0",
"stylelint-config-standard": "^20.0.0", "stylelint-config-standard": "^22.0.0",
"stylelint-scss": "^3.19.0", "stylelint-scss": "^3.20.1",
"ts-node": "~9.1.1", "ts-node": "~10.2.0",
"tslint": "~6.1.3", "tslint": "~6.1.3",
"typescript": "^4.2.4" "typescript": "^4.2.4"
} }

View File

@@ -1,4 +1,4 @@
<div class="max-width-container"> <div [ngClass]="{'max-width-container': maxWidth, 'enlarged-container': !maxWidth}">
<div class="detail-container"> <div class="detail-container">
<div class="detail-left"> <div class="detail-left">
<a *ngIf="backRouterLink" [routerLink]="backRouterLink" mat-icon-button> <a *ngIf="backRouterLink" [routerLink]="backRouterLink" mat-icon-button>

View File

@@ -10,7 +10,6 @@
$lighter-color: rgba(mat.get-color-from-palette($primary, 300), .5); $lighter-color: rgba(mat.get-color-from-palette($primary, 300), .5);
.detail-container { .detail-container {
width: 100%;
display: flex; display: flex;
padding-bottom: 3rem; padding-bottom: 3rem;

View File

@@ -10,4 +10,5 @@ export class DetailLayoutComponent {
@Input() backRouterLink!: RouterLink; @Input() backRouterLink!: RouterLink;
@Input() title: string | null = ''; @Input() title: string | null = '';
@Input() description: string | null = ''; @Input() description: string | null = '';
@Input() maxWidth: boolean = true;
} }

View File

@@ -49,7 +49,7 @@
<div class="divider"></div> <div class="divider"></div>
<p class="default" *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</p> <cnsl-info-section *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</cnsl-info-section>
<div class="content" *ngIf="features"> <div class="content" *ngIf="features">
<div class="row"> <div class="row">
<span class="left-desc">{{'FEATURES.DATA.AUDITLOGRETENTION' | translate}}</span> <span class="left-desc">{{'FEATURES.DATA.AUDITLOGRETENTION' | translate}}</span>

View File

@@ -1,8 +1,3 @@
.default {
color: var(--color-main);
font-size: 14px;
}
.tier-desc { .tier-desc {
color: var(--grey); color: var(--grey);
font-size: 14px; font-size: 14px;

View File

@@ -1,7 +1,7 @@
<app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']" <app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']"
[title]="'POLICY.LOGIN_POLICY.TITLE' | translate" [title]="'POLICY.LOGIN_POLICY.TITLE' | translate"
[description]="(serviceType==PolicyComponentServiceType.MGMT ? 'POLICY.LOGIN_POLICY.DESCRIPTIONCREATEMGMT' : PolicyComponentServiceType.ADMIN ? 'POLICY.LOGIN_POLICY.DESCRIPTIONCREATEADMIN' : '') | translate"> [description]="(serviceType==PolicyComponentServiceType.MGMT ? 'POLICY.LOGIN_POLICY.DESCRIPTIONCREATEMGMT' : PolicyComponentServiceType.ADMIN ? 'POLICY.LOGIN_POLICY.DESCRIPTIONCREATEADMIN' : '') | translate">
<p class="default" *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</p> <cnsl-info-section *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</cnsl-info-section>
<div class="spinner-wr"> <div class="spinner-wr">
<mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner> <mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner>

View File

@@ -1,8 +1,3 @@
.default {
color: var(--color-main);
margin-top: 0;
}
.spinner-wr { .spinner-wr {
margin: .5rem 0; margin: .5rem 0;
} }

View File

@@ -19,6 +19,9 @@ import {
MFAProvidersText, MFAProvidersText,
PasswordChangeDoneScreenText, PasswordChangeDoneScreenText,
PasswordChangeScreenText, PasswordChangeScreenText,
PasswordlessPromptScreenText,
PasswordlessRegistrationDoneScreenText,
PasswordlessRegistrationScreenText,
PasswordlessScreenText, PasswordlessScreenText,
PasswordResetDoneScreenText, PasswordResetDoneScreenText,
PasswordScreenText, PasswordScreenText,
@@ -313,5 +316,39 @@ export function mapRequestValues(map: Partial<Map>, req: Req): Req {
r29.setValidateTokenText(map.verifyMfaU2fText?.validateTokenText ?? ''); r29.setValidateTokenText(map.verifyMfaU2fText?.validateTokenText ?? '');
req.setVerifyMfaU2fText(r29); req.setVerifyMfaU2fText(r29);
const r30 = new PasswordlessPromptScreenText();
r30.setDescription(map.passwordlessPromptText?.description ?? '');
r30.setDescriptionInit(map.passwordlessPromptText?.descriptionInit ?? '');
r30.setNextButtonText(map.passwordlessPromptText?.nextButtonText ?? '');
r30.setPasswordlessButtonText(map.passwordlessPromptText?.passwordlessButtonText ?? '');
r30.setSkipButtonText(map.passwordlessPromptText?.skipButtonText ?? '');
r30.setTitle(map.passwordlessPromptText?.title ?? '');
req.setPasswordlessPromptText(r30);
const r31 = new PasswordlessRegistrationDoneScreenText();
r31.setDescription(map.passwordlessRegistrationDoneText?.description ?? '');
r31.setNextButtonText(map.passwordlessRegistrationDoneText?.nextButtonText ?? '');
r31.setTitle(map.passwordlessRegistrationDoneText?.title ?? '');
req.setPasswordlessRegistrationDoneText(r31);
const r32 = new PasswordlessRegistrationScreenText();
r32.setDescription(map.passwordlessRegistrationText?.description ?? '');
r32.setErrorRetry(map.passwordlessRegistrationText?.errorRetry ?? '');
r32.setNotSupported(map.passwordlessRegistrationText?.notSupported ?? '');
r32.setRegisterTokenButtonText(map.passwordlessRegistrationText?.registerTokenButtonText ?? '');
r32.setTitle(map.passwordlessRegistrationText?.title ?? '');
r32.setTokenNameLabel(map.passwordlessRegistrationText?.tokenNameLabel ?? '');
req.setPasswordlessRegistrationText(r32);
const r33 = new PasswordlessScreenText();
r33.setDescription(map.passwordlessText?.description ?? '');
r33.setErrorRetry(map.passwordlessText?.errorRetry ?? '');
r33.setLoginWithPwButtonText(map.passwordlessText?.loginWithPwButtonText ?? '');
r33.setNotSupported(map.passwordlessText?.notSupported ?? '');
r33.setTitle(map.passwordlessText?.title ?? '');
r33.setValidateTokenButtonText(map.passwordlessText?.validateTokenButtonText ?? '');
req.setPasswordlessText(r33);
return req; return req;
} }

View File

@@ -46,7 +46,6 @@ const KeyNamesArray = [
'passwordChangeText', 'passwordChangeText',
'passwordResetDoneText', 'passwordResetDoneText',
'passwordText', 'passwordText',
'passwordlessText',
'registrationOptionText', 'registrationOptionText',
'registrationOrgText', 'registrationOrgText',
'registrationUserText', 'registrationUserText',
@@ -56,6 +55,10 @@ const KeyNamesArray = [
'usernameChangeText', 'usernameChangeText',
'verifyMfaOtpText', 'verifyMfaOtpText',
'verifyMfaU2fText', 'verifyMfaU2fText',
'passwordlessPromptText',
'passwordlessRegistrationDoneText',
'passwordlessRegistrationText',
'passwordlessText',
]; ];
// tslint:enable // tslint:enable

View File

@@ -1,4 +1,4 @@
<app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']" <app-detail-layout [maxWidth]="false" [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']"
[title]="'POLICY.MESSAGE_TEXTS.TITLE' | translate" [title]="'POLICY.MESSAGE_TEXTS.TITLE' | translate"
[description]="'POLICY.MESSAGE_TEXTS.DESCRIPTION' | translate"> [description]="'POLICY.MESSAGE_TEXTS.DESCRIPTION' | translate">
@@ -27,7 +27,7 @@
</cnsl-info-section> </cnsl-info-section>
<div class="content" > <div class="content" >
<cnsl-edit-text [chips]="chips" [disabled]="serviceType == PolicyComponentServiceType.MGMT && (['custom_text'] | hasFeature | async) == false" label="one" [default$]="getDefaultInitMessageTextMap$" [current$]="getCustomInitMessageTextMap$" (changedValues)="updateCurrentValues( <cnsl-edit-text [chips]="chips[currentType]" [disabled]="serviceType == PolicyComponentServiceType.MGMT && (['custom_text'] | hasFeature | async) == false" label="one" [default$]="getDefaultInitMessageTextMap$" [current$]="getCustomInitMessageTextMap$" (changedValues)="updateCurrentValues(
$event)"></cnsl-edit-text> $event)"></cnsl-edit-text>
</div> </div>

View File

@@ -11,22 +11,26 @@ import {
GetDefaultVerifyPhoneMessageTextRequest as AdminGetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextRequest as AdminGetDefaultVerifyPhoneMessageTextRequest,
SetDefaultDomainClaimedMessageTextRequest, SetDefaultDomainClaimedMessageTextRequest,
SetDefaultInitMessageTextRequest, SetDefaultInitMessageTextRequest,
SetDefaultPasswordlessRegistrationMessageTextRequest,
SetDefaultPasswordResetMessageTextRequest, SetDefaultPasswordResetMessageTextRequest,
SetDefaultVerifyEmailMessageTextRequest, SetDefaultVerifyEmailMessageTextRequest,
SetDefaultVerifyPhoneMessageTextRequest, SetDefaultVerifyPhoneMessageTextRequest,
} from 'src/app/proto/generated/zitadel/admin_pb'; } from 'src/app/proto/generated/zitadel/admin_pb';
import { import {
GetCustomDomainClaimedMessageTextRequest, GetCustomDomainClaimedMessageTextRequest,
GetCustomPasswordlessRegistrationMessageTextRequest,
GetCustomPasswordResetMessageTextRequest, GetCustomPasswordResetMessageTextRequest,
GetCustomVerifyEmailMessageTextRequest, GetCustomVerifyEmailMessageTextRequest,
GetCustomVerifyPhoneMessageTextRequest, GetCustomVerifyPhoneMessageTextRequest,
GetDefaultDomainClaimedMessageTextRequest, GetDefaultDomainClaimedMessageTextRequest,
GetDefaultInitMessageTextRequest, GetDefaultInitMessageTextRequest,
GetDefaultPasswordlessRegistrationMessageTextRequest,
GetDefaultPasswordResetMessageTextRequest, GetDefaultPasswordResetMessageTextRequest,
GetDefaultVerifyEmailMessageTextRequest, GetDefaultVerifyEmailMessageTextRequest,
GetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextRequest,
SetCustomDomainClaimedMessageTextRequest, SetCustomDomainClaimedMessageTextRequest,
SetCustomInitMessageTextRequest, SetCustomInitMessageTextRequest,
SetCustomPasswordlessRegistrationMessageTextRequest,
SetCustomPasswordResetMessageTextRequest, SetCustomPasswordResetMessageTextRequest,
SetCustomVerifyEmailMessageTextRequest, SetCustomVerifyEmailMessageTextRequest,
SetCustomVerifyPhoneMessageTextRequest, SetCustomVerifyPhoneMessageTextRequest,
@@ -46,6 +50,7 @@ enum MESSAGETYPES {
VERIFYEMAIL = 'VE', VERIFYEMAIL = 'VE',
PASSWORDRESET = 'PR', PASSWORDRESET = 'PR',
DOMAINCLAIMED = 'DC', DOMAINCLAIMED = 'DC',
PASSWORDLESS = 'PL',
} }
const REQUESTMAP = { const REQUESTMAP = {
@@ -134,6 +139,24 @@ const REQUESTMAP = {
req.setText(map.text ?? ''); req.setText(map.text ?? '');
req.setTitle(map.title ?? ''); req.setTitle(map.title ?? '');
return req;
},
},
[MESSAGETYPES.PASSWORDLESS]: {
get: new GetCustomPasswordlessRegistrationMessageTextRequest(),
set: new SetCustomPasswordlessRegistrationMessageTextRequest(),
getDefault: new GetDefaultPasswordlessRegistrationMessageTextRequest(),
setFcn: (map: Partial<SetCustomPasswordlessRegistrationMessageTextRequest.AsObject>):
SetCustomPasswordlessRegistrationMessageTextRequest => {
const req = new SetCustomPasswordlessRegistrationMessageTextRequest();
req.setButtonText(map.buttonText ?? '');
req.setFooterText(map.footerText ?? '');
req.setGreeting(map.greeting ?? '');
req.setPreHeader(map.preHeader ?? '');
req.setSubject(map.subject ?? '');
req.setText(map.text ?? '');
req.setTitle(map.title ?? '');
return req; return req;
}, },
}, },
@@ -221,6 +244,23 @@ const REQUESTMAP = {
req.setText(map.text ?? ''); req.setText(map.text ?? '');
req.setTitle(map.title ?? ''); req.setTitle(map.title ?? '');
return req;
},
},
[MESSAGETYPES.PASSWORDLESS]: {
get: new GetDefaultPasswordlessRegistrationMessageTextRequest(),
set: new SetDefaultPasswordlessRegistrationMessageTextRequest(),
setFcn: (map: Partial<SetDefaultPasswordlessRegistrationMessageTextRequest.AsObject>):
SetDefaultPasswordlessRegistrationMessageTextRequest => {
const req = new SetDefaultPasswordlessRegistrationMessageTextRequest();
req.setButtonText(map.buttonText ?? '');
req.setFooterText(map.footerText ?? '');
req.setGreeting(map.greeting ?? '');
req.setPreHeader(map.preHeader ?? '');
req.setSubject(map.subject ?? '');
req.setText(map.text ?? '');
req.setTitle(map.title ?? '');
return req; return req;
}, },
}, },
@@ -245,12 +285,100 @@ export class MessageTextsComponent implements OnDestroy {
public updateRequest!: SetCustomInitMessageTextRequest | SetDefaultInitMessageTextRequest; public updateRequest!: SetCustomInitMessageTextRequest | SetDefaultInitMessageTextRequest;
public chips: any[] = [ public chips: {
[messagetype: string]: Array<{ key: string; value: string; }>;
} = {
[MESSAGETYPES.DOMAINCLAIMED]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.domain', value: '{{.Domain}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.tempUsername', value: '{{.TempUsername}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
[MESSAGETYPES.INIT]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.code', value: '{{.Code}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.code', value: '{{.Code}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
]; { key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
[MESSAGETYPES.PASSWORDRESET]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.code', value: '{{.Code}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
[MESSAGETYPES.VERIFYEMAIL]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.code', value: '{{.Code}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
[MESSAGETYPES.VERIFYPHONE]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.code', value: '{{.Code}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
[MESSAGETYPES.PASSWORDLESS]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
};
public locale: string = 'en'; public locale: string = 'en';
public LOCALES: string[] = ['en']; public LOCALES: string[] = ['en'];
@@ -283,9 +411,7 @@ export class MessageTextsComponent implements OnDestroy {
} }
return this.route.params; return this.route.params;
})).subscribe(() => { })).subscribe();
});
} }
public getDefaultValues(type: MESSAGETYPES, req: any): Promise<any> { public getDefaultValues(type: MESSAGETYPES, req: any): Promise<any> {
@@ -300,6 +426,8 @@ export class MessageTextsComponent implements OnDestroy {
return this.stripDetails((this.service).getDefaultPasswordResetMessageText(req)); return this.stripDetails((this.service).getDefaultPasswordResetMessageText(req));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
return this.stripDetails((this.service).getDefaultDomainClaimedMessageText(req)); return this.stripDetails((this.service).getDefaultDomainClaimedMessageText(req));
case MESSAGETYPES.PASSWORDLESS:
return this.stripDetails((this.service).getDefaultPasswordlessRegistrationMessageText(req));
} }
} }
@@ -316,6 +444,8 @@ export class MessageTextsComponent implements OnDestroy {
return this.stripDetails((this.service as ManagementService).getCustomPasswordResetMessageText(req)); return this.stripDetails((this.service as ManagementService).getCustomPasswordResetMessageText(req));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
return this.stripDetails((this.service as ManagementService).getCustomDomainClaimedMessageText(req)); return this.stripDetails((this.service as ManagementService).getCustomDomainClaimedMessageText(req));
case MESSAGETYPES.PASSWORDLESS:
return this.stripDetails((this.service as ManagementService).getCustomPasswordlessRegistrationMessageText(req));
} }
} else if (this.serviceType === PolicyComponentServiceType.ADMIN) { } else if (this.serviceType === PolicyComponentServiceType.ADMIN) {
switch (type) { switch (type) {
@@ -329,6 +459,8 @@ export class MessageTextsComponent implements OnDestroy {
return this.stripDetails((this.service as AdminService).getCustomPasswordResetMessageText(req)); return this.stripDetails((this.service as AdminService).getCustomPasswordResetMessageText(req));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
return this.stripDetails((this.service as AdminService).getCustomDomainClaimedMessageText(req)); return this.stripDetails((this.service as AdminService).getCustomDomainClaimedMessageText(req));
case MESSAGETYPES.PASSWORDLESS:
return this.stripDetails((this.service as AdminService).getCustomPasswordlessRegistrationMessageText(req));
} }
} }
} }
@@ -380,6 +512,9 @@ export class MessageTextsComponent implements OnDestroy {
return handler((this.service as ManagementService).setCustomPasswordResetMessageText(this.updateRequest)); return handler((this.service as ManagementService).setCustomPasswordResetMessageText(this.updateRequest));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
return handler((this.service as ManagementService).setCustomDomainClaimedMessageCustomText(this.updateRequest)); return handler((this.service as ManagementService).setCustomDomainClaimedMessageCustomText(this.updateRequest));
case MESSAGETYPES.PASSWORDLESS:
return handler((this.service as ManagementService)
.getCustomPasswordlessRegistrationMessageText(this.updateRequest));
} }
} else if (this.serviceType === PolicyComponentServiceType.ADMIN) { } else if (this.serviceType === PolicyComponentServiceType.ADMIN) {
switch (this.currentType) { switch (this.currentType) {
@@ -393,6 +528,9 @@ export class MessageTextsComponent implements OnDestroy {
return handler((this.service as AdminService).setDefaultPasswordResetMessageText(this.updateRequest)); return handler((this.service as AdminService).setDefaultPasswordResetMessageText(this.updateRequest));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
return handler((this.service as AdminService).setDefaultDomainClaimedMessageText(this.updateRequest)); return handler((this.service as AdminService).setDefaultDomainClaimedMessageText(this.updateRequest));
case MESSAGETYPES.PASSWORDLESS:
return handler((this.service as AdminService)
.setDefaultPasswordlessRegistrationMessageText(this.updateRequest));
} }
} }
} }
@@ -433,6 +571,10 @@ export class MessageTextsComponent implements OnDestroy {
return handler((this.service as ManagementService).resetCustomPasswordResetMessageTextToDefault(this.locale)); return handler((this.service as ManagementService).resetCustomPasswordResetMessageTextToDefault(this.locale));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
return handler((this.service as ManagementService).resetCustomDomainClaimedMessageTextToDefault(this.locale)); return handler((this.service as ManagementService).resetCustomDomainClaimedMessageTextToDefault(this.locale));
case MESSAGETYPES.DOMAINCLAIMED:
return handler((this.service as ManagementService)
.resetCustomPasswordlessRegistrationMessageTextToDefault(this.locale));
} }
} }

View File

@@ -1,6 +1,6 @@
<app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']" <app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']"
[title]="'POLICY.IAM_POLICY.TITLE' | translate" [description]="'POLICY.IAM_POLICY.DESCRIPTION' | translate"> [title]="'POLICY.IAM_POLICY.TITLE' | translate" [description]="'POLICY.IAM_POLICY.DESCRIPTION' | translate">
<p class="default" *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</p> <cnsl-info-section *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</cnsl-info-section>
<ng-template appHasRole [appHasRole]="['iam.policy.delete']"> <ng-template appHasRole [appHasRole]="['iam.policy.delete']">
<button *ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault" <button *ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault"

View File

@@ -1,7 +1,7 @@
<app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']" <app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam/policies' : '/org']"
[title]="'POLICY.PWD_COMPLEXITY.TITLE' | translate" [description]="'POLICY.PWD_COMPLEXITY.DESCRIPTION' | translate"> [title]="'POLICY.PWD_COMPLEXITY.TITLE' | translate" [description]="'POLICY.PWD_COMPLEXITY.DESCRIPTION' | translate">
<p class="default" *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</p> <cnsl-info-section *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</cnsl-info-section>
<div class="spinner-wr"> <div class="spinner-wr">
<mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner> <mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner>

View File

@@ -1,8 +1,3 @@
.default {
color: var(--color-main);
margin-top: 0;
}
.spinner-wr { .spinner-wr {
margin: .5rem 0; margin: .5rem 0;
} }

View File

@@ -11,6 +11,7 @@ import { HasRoleModule } from 'src/app/directives/has-role/has-role.module';
import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module';
import { InputModule } from 'src/app/modules/input/input.module'; import { InputModule } from 'src/app/modules/input/input.module';
import { InfoSectionModule } from '../../info-section/info-section.module';
import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; import { PolicyGridModule } from '../../policy-grid/policy-grid.module';
import { PasswordComplexityPolicyRoutingModule } from './password-complexity-policy-routing.module'; import { PasswordComplexityPolicyRoutingModule } from './password-complexity-policy-routing.module';
import { PasswordComplexityPolicyComponent } from './password-complexity-policy.component'; import { PasswordComplexityPolicyComponent } from './password-complexity-policy.component';
@@ -31,6 +32,7 @@ import { PasswordComplexityPolicyComponent } from './password-complexity-policy.
DetailLayoutModule, DetailLayoutModule,
MatProgressSpinnerModule, MatProgressSpinnerModule,
PolicyGridModule, PolicyGridModule,
InfoSectionModule,
], ],
}) })
export class PasswordComplexityPolicyModule { } export class PasswordComplexityPolicyModule { }

View File

@@ -2,6 +2,8 @@
[title]="'POLICY.PRIVACY_POLICY.TITLE' | translate" [title]="'POLICY.PRIVACY_POLICY.TITLE' | translate"
[description]="'POLICY.PRIVACY_POLICY.DESCRIPTION' | translate"> [description]="'POLICY.PRIVACY_POLICY.DESCRIPTION' | translate">
<cnsl-info-section *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</cnsl-info-section>
<cnsl-info-section class="warn" <cnsl-info-section class="warn"
*ngIf="serviceType == PolicyComponentServiceType.MGMT && (['privacy_policy'] | hasFeature | async) == false" *ngIf="serviceType == PolicyComponentServiceType.MGMT && (['privacy_policy'] | hasFeature | async) == false"
type="WARN"> type="WARN">

View File

@@ -144,4 +144,12 @@ export class PrivacyPolicyComponent implements OnDestroy {
public ngOnDestroy(): void { public ngOnDestroy(): void {
this.sub.unsubscribe(); this.sub.unsubscribe();
} }
public get isDefault(): boolean {
if (this.privacyPolicy && this.serviceType === PolicyComponentServiceType.MGMT) {
return (this.privacyPolicy as PrivacyPolicy.AsObject).isDefault;
} else {
return false;
}
}
} }

View File

@@ -28,7 +28,6 @@ import { PrivacyPolicyComponent } from './privacy-policy.component';
PrivacyPolicyRoutingModule, PrivacyPolicyRoutingModule,
MatSelectModule, MatSelectModule,
CommonModule, CommonModule,
InfoSectionModule,
ReactiveFormsModule, ReactiveFormsModule,
FormsModule, FormsModule,
InputModule, InputModule,
@@ -47,6 +46,7 @@ import { PrivacyPolicyComponent } from './privacy-policy.component';
MatDialogModule, MatDialogModule,
WarnDialogModule, WarnDialogModule,
PolicyGridModule, PolicyGridModule,
InfoSectionModule,
], ],
}) })
export class PrivacyPolicyModule { } export class PrivacyPolicyModule { }

View File

@@ -25,7 +25,7 @@
</div> </div>
<div class="btn-wrapper"> <div class="btn-wrapper">
<button mat-stroked-button [style.color]="theme == Theme.DARK ? policy.fontColorDark : policy.fontColor">{{'POLICY.PRIVATELABELING.PREVIEW.SECONDARYBUTTON' | translate}}</button> <button mat-stroked-button [style.color]="theme == Theme.DARK ? policy.primaryColorDark : policy.primaryColor">{{'POLICY.PRIVATELABELING.PREVIEW.SECONDARYBUTTON' | translate}}</button>
<button *ngIf="theme == Theme.DARK" mat-raised-button [style.background]="policy.primaryColorDark" [style.color]="policy.primaryColorDark == '#ffffff' ? '#000000' : '#ffffff'">{{'POLICY.PRIVATELABELING.PREVIEW.PRIMARYBUTTON' | translate}}</button> <button *ngIf="theme == Theme.DARK" mat-raised-button [style.background]="policy.primaryColorDark" [style.color]="policy.primaryColorDark == '#ffffff' ? '#000000' : '#ffffff'">{{'POLICY.PRIVATELABELING.PREVIEW.PRIMARYBUTTON' | translate}}</button>
<button *ngIf="theme == Theme.LIGHT" mat-raised-button [style.background]="policy.primaryColor" [style.color]="policy.primaryColor == '#ffffff' ? '#000000' : '#ffffff'">{{'POLICY.PRIVATELABELING.PREVIEW.PRIMARYBUTTON' | translate}}</button> <button *ngIf="theme == Theme.LIGHT" mat-raised-button [style.background]="policy.primaryColor" [style.color]="policy.primaryColor == '#ffffff' ? '#000000' : '#ffffff'">{{'POLICY.PRIVATELABELING.PREVIEW.PRIMARYBUTTON' | translate}}</button>
</div> </div>

View File

@@ -9,7 +9,7 @@
</div> </div>
</div> </div>
<p class="desc">{{'POLICY.PRIVATELABELING.PREVIEW_DESCRIPTION' | translate}}</p> <p class="desc">{{'POLICY.PRIVATELABELING.PREVIEW_DESCRIPTION' | translate}}</p>
<p class="default" *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</p> <cnsl-info-section *ngIf="isDefault"> {{'POLICY.DEFAULTLABEL' | translate}}</cnsl-info-section>
<div class="spinner-wr"> <div class="spinner-wr">
<mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner> <mat-spinner diameter="30" *ngIf="loading" color="primary"></mat-spinner>
@@ -59,6 +59,8 @@
<p class="description">Your Logo will be used in the Login itself, while the icon is used for smaller UI elements like in the organisation switcher in console</p> <p class="description">Your Logo will be used in the Login itself, while the icon is used for smaller UI elements like in the organisation switcher in console</p>
<cnsl-info-section class="max-size-desc"> {{'POLICY.PRIVATELABELING.MAXSIZE' | translate}}</cnsl-info-section>
<!-- <span class="title">{{ theme === Theme.DARK ? ('POLICY.PRIVATELABELING.DARK' | translate) : ('POLICY.PRIVATELABELING.LIGHT' | translate)}}</span> --> <!-- <span class="title">{{ theme === Theme.DARK ? ('POLICY.PRIVATELABELING.DARK' | translate) : ('POLICY.PRIVATELABELING.LIGHT' | translate)}}</span> -->
<div class="logo-setup-wrapper"> <div class="logo-setup-wrapper">
<div class="part"> <div class="part">
@@ -93,7 +95,7 @@
<i class="icon las la-image"></i> <i class="icon las la-image"></i>
<span>{{isHoveringOverDarkLogo ? ('POLICY.PRIVATELABELING.RELEASE' | translate): ('POLICY.PRIVATELABELING.DROP' | translate)}}</span> <span>{{isHoveringOverDarkLogo ? ('POLICY.PRIVATELABELING.RELEASE' | translate): ('POLICY.PRIVATELABELING.DROP' | translate)}}</span>
<input #selectedFile style="display: none;" class="file-input" type="file" (change)="onDropLogo(theme, $event.target.files)"> <input #selectedFile style="display: none;" class="file-input" type="file" (change)="onDropLogo(theme, $event.target.files)">
<a class="btn" *ngIf="serviceType == PolicyComponentServiceType.ADMIN || (serviceType == PolicyComponentServiceType.MGMT && (['label_policy.private_label'] | hasFeature | async))" (click)="selectedFile.click();">{{'POLICY.PRIVATELABELING.BTN' | translate}}</a> <a class="btn" *ngIf="serviceType == PolicyComponentServiceType.ADMIN || (serviceType == PolicyComponentServiceType.MGMT && (['label_policy.private_label'] | hasFeature | async))" (click)="$event.preventDefault(); selectedFile.click();">{{'POLICY.PRIVATELABELING.BTN' | translate}}</a>
</label> </label>
</div> </div>
</div> </div>
@@ -132,7 +134,7 @@
<i class="icon las la-image"></i> <i class="icon las la-image"></i>
<span>{{isHoveringOverDarkIcon ? ('POLICY.PRIVATELABELING.RELEASE' | translate): ('POLICY.PRIVATELABELING.DROP' | translate)}}</span> <span>{{isHoveringOverDarkIcon ? ('POLICY.PRIVATELABELING.RELEASE' | translate): ('POLICY.PRIVATELABELING.DROP' | translate)}}</span>
<input #selectedFileIcon style="display: none;" class="file-input" type="file" (change)="onDropIcon(theme, $event.target.files)"> <input #selectedFileIcon style="display: none;" class="file-input" type="file" (change)="onDropIcon(theme, $event.target.files)">
<a class="btn" *ngIf="serviceType == PolicyComponentServiceType.ADMIN || (serviceType == PolicyComponentServiceType.MGMT && (['label_policy.private_label'] | hasFeature | async))" (click)="selectedFileIcon.click();">{{'POLICY.PRIVATELABELING.BTN' | translate}}</a> <a class="btn" *ngIf="serviceType == PolicyComponentServiceType.ADMIN || (serviceType == PolicyComponentServiceType.MGMT && (['label_policy.private_label'] | hasFeature | async))" (click)="$event.preventDefault(); selectedFileIcon.click();">{{'POLICY.PRIVATELABELING.BTN' | translate}}</a>
</label> </label>
</div> </div>
</div> </div>
@@ -205,6 +207,7 @@
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div class="fonts"> <div class="fonts">
<cnsl-info-section class="info-section">{{'POLICY.PRIVATELABELING.FONTINLOGINONLY' | translate}}</cnsl-info-section>
<div class="font-preview mat-elevation-z3" *ngIf="preview == Preview.PREVIEW && previewData.fontUrl || preview == Preview.CURRENT && data.fontUrl"> <div class="font-preview mat-elevation-z3" *ngIf="preview == Preview.PREVIEW && previewData.fontUrl || preview == Preview.CURRENT && data.fontUrl">
<mat-icon class="icon">text_fields</mat-icon> <mat-icon class="icon">text_fields</mat-icon>
<span>ABC • abc • 123</span> <span>ABC • abc • 123</span>

View File

@@ -28,11 +28,6 @@
} }
} }
.default {
color: var(--color-main);
margin-top: 0;
}
.desc { .desc {
font-size: 14px; font-size: 14px;
color: var(--grey); color: var(--grey);
@@ -40,6 +35,11 @@
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.max-size-desc {
display: block;
margin-bottom: 1rem;
}
.spinner-wr { .spinner-wr {
margin: .5rem 0; margin: .5rem 0;
} }
@@ -323,6 +323,11 @@
} }
.fonts { .fonts {
.info-section {
display: block;
margin-bottom: 1rem;
}
.title { .title {
display: block; display: block;
font-size: 14px; font-size: 14px;

View File

@@ -49,6 +49,7 @@ export enum ColorType {
} }
const ORG_STORAGE_KEY = 'organization'; const ORG_STORAGE_KEY = 'organization';
const MAX_ALLOWED_SIZE = 0.5 * 1024 * 1024;
@Component({ @Component({
selector: 'app-private-labeling-policy', selector: 'app-private-labeling-policy',
@@ -139,6 +140,9 @@ export class PrivateLabelingPolicyComponent implements OnDestroy {
const file = filelist.item(0); const file = filelist.item(0);
if (file) { if (file) {
if (file.size > MAX_ALLOWED_SIZE) {
this.toast.showInfo('POLICY.PRIVATELABELING.MAXSIZEEXCEEDED', true);
} else {
const formData = new FormData(); const formData = new FormData();
formData.append('file', file); formData.append('file', file);
if (theme === Theme.DARK) { if (theme === Theme.DARK) {
@@ -157,7 +161,7 @@ export class PrivateLabelingPolicyComponent implements OnDestroy {
return this.handleUploadPromise(this.assetService.upload(AssetEndpoint.IAMLOGO, formData, this.org.id)); return this.handleUploadPromise(this.assetService.upload(AssetEndpoint.IAMLOGO, formData, this.org.id));
} }
} }
}
} }
} }
@@ -262,6 +266,9 @@ export class PrivateLabelingPolicyComponent implements OnDestroy {
const file = filelist.item(0); const file = filelist.item(0);
if (file) { if (file) {
if (file.size > MAX_ALLOWED_SIZE) {
this.toast.showInfo('POLICY.PRIVATELABELING.MAXSIZEEXCEEDED', true);
} else {
const formData = new FormData(); const formData = new FormData();
formData.append('file', file); formData.append('file', file);
if (theme === Theme.DARK) { if (theme === Theme.DARK) {
@@ -286,6 +293,7 @@ export class PrivateLabelingPolicyComponent implements OnDestroy {
} }
} }
} }
}
private handleFontUploadPromise(task: Promise<any>): Promise<any> { private handleFontUploadPromise(task: Promise<any>): Promise<any> {
const enhTask = task.then(() => { const enhTask = task.then(() => {

View File

@@ -3,6 +3,7 @@ import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
import { BehaviorSubject, from, Observable, of } from 'rxjs'; import { BehaviorSubject, from, Observable, of } from 'rxjs';
import { catchError, finalize, map } from 'rxjs/operators'; import { catchError, finalize, map } from 'rxjs/operators';
import { Membership } from 'src/app/proto/generated/zitadel/user_pb'; import { Membership } from 'src/app/proto/generated/zitadel/user_pb';
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
import { ManagementService } from 'src/app/services/mgmt.service'; import { ManagementService } from 'src/app/services/mgmt.service';
export class MembershipDetailDataSource extends DataSource<Membership.AsObject> { export class MembershipDetailDataSource extends DataSource<Membership.AsObject> {
@@ -13,7 +14,7 @@ export class MembershipDetailDataSource extends DataSource<Membership.AsObject>
private loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false); private loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
public loading$: Observable<boolean> = this.loadingSubject.asObservable(); public loading$: Observable<boolean> = this.loadingSubject.asObservable();
constructor(private mgmtUserService: ManagementService) { constructor(private mgmtUserService: ManagementService, private authServce: GrpcAuthService) {
super(); super();
} }
@@ -36,6 +37,25 @@ export class MembershipDetailDataSource extends DataSource<Membership.AsObject>
}); });
} }
public loadMyMemberships(pageIndex: number, pageSize: number): void {
const offset = pageIndex * pageSize;
this.loadingSubject.next(true);
from(this.authServce.listMyMemberships(pageSize, offset)).pipe(
map(resp => {
this.totalResult = resp.details?.totalResult || 0;
if (resp.details?.viewTimestamp) {
this.viewTimestamp = resp.details.viewTimestamp;
}
return resp.resultList;
}),
catchError(() => of([])),
finalize(() => this.loadingSubject.next(false)),
).subscribe(members => {
this.membersSubject.next(members);
});
}
/** /**
* Connect this data source to the table. The table will only update when * Connect this data source to the table. The table will only update when

View File

@@ -1,6 +1,11 @@
<app-detail-layout [backRouterLink]="[ '/users', user?.id]" <app-detail-layout [backRouterLink]="[ '/users', user?.id]"
title="{{user?.human?.displayName}} {{ 'USER.MEMBERSHIPS.TITLE' | translate }}" title="{{user?.human?.displayName}} {{ 'USER.MEMBERSHIPS.TITLE' | translate }}"
description="{{ 'USER.MEMBERSHIPS.DESCRIPTION' | translate }}"> description="{{ 'USER.MEMBERSHIPS.DESCRIPTION' | translate }}">
<cnsl-info-section class="context-wrapper">
<span *ngIf="isMe">{{'USER.MEMBERSHIPS.USERCONTEXT' | translate}}</span>
<span *ngIf="!isMe">{{'USER.MEMBERSHIPS.ORGCONTEXT' | translate}}</span>
</cnsl-info-section>
<app-refresh-table class="refresh-table" (refreshed)="refreshPage()" [dataSize]="dataSource?.totalResult" <app-refresh-table class="refresh-table" (refreshed)="refreshPage()" [dataSize]="dataSource?.totalResult"
[timestamp]="dataSource?.viewTimestamp" [selection]="selection" [loading]="dataSource?.loading$ | async"> [timestamp]="dataSource?.viewTimestamp" [selection]="selection" [loading]="dataSource?.loading$ | async">

View File

@@ -1,3 +1,8 @@
.context-wrapper {
margin-bottom: 1rem;
display: block;
}
.refresh-table { .refresh-table {
width: 100%; width: 100%;
} }

View File

@@ -3,11 +3,12 @@ import { AfterViewInit, Component, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { MatTable } from '@angular/material/table'; import { MatTable } from '@angular/material/table';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { tap } from 'rxjs/operators'; import { map, switchMap, tap } from 'rxjs/operators';
import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component';
import { PaginatorComponent } from 'src/app/modules/paginator/paginator.component'; import { PaginatorComponent } from 'src/app/modules/paginator/paginator.component';
import { Membership, User } from 'src/app/proto/generated/zitadel/user_pb'; import { Membership, User } from 'src/app/proto/generated/zitadel/user_pb';
import { AdminService } from 'src/app/services/admin.service'; import { AdminService } from 'src/app/services/admin.service';
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
import { ManagementService } from 'src/app/services/mgmt.service'; import { ManagementService } from 'src/app/services/mgmt.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
@@ -35,20 +36,41 @@ export class MembershipDetailComponent implements AfterViewInit {
public loading: boolean = false; public loading: boolean = false;
public memberships!: Membership.AsObject[]; public memberships!: Membership.AsObject[];
public isMe: boolean = false;
constructor( constructor(
authService: GrpcAuthService,
activatedRoute: ActivatedRoute, activatedRoute: ActivatedRoute,
private dialog: MatDialog, private dialog: MatDialog,
private toast: ToastService, private toast: ToastService,
private mgmtService: ManagementService, private mgmtService: ManagementService,
private adminService: AdminService, private adminService: AdminService,
) { ) {
activatedRoute.params.subscribe(data => { activatedRoute.params
const { id } = data; .pipe(switchMap(({ id }) => {
if (id) { return authService.user.pipe(
map(user => user?.id === id),
tap((isMe) => {
this.isMe = isMe;
if (isMe) {
this.mgmtService.getUserByID(id).then(resp => { this.mgmtService.getUserByID(id).then(resp => {
if (resp.user) { if (resp.user) {
this.user = resp.user; this.user = resp.user;
this.dataSource = new MembershipDetailDataSource(this.mgmtService); this.dataSource = new MembershipDetailDataSource(this.mgmtService, authService);
this.dataSource.loadMyMemberships(
0,
50,
);
}
}).catch(err => {
console.error(err);
});
} else {
this.mgmtService.getUserByID(id).then(resp => {
if (resp.user) {
this.user = resp.user;
this.dataSource = new MembershipDetailDataSource(this.mgmtService, authService);
this.dataSource.loadMemberships( this.dataSource.loadMemberships(
this.user.id, this.user.id,
0, 0,
@@ -59,7 +81,9 @@ export class MembershipDetailComponent implements AfterViewInit {
console.error(err); console.error(err);
}); });
} }
}); }),
);
})).subscribe();
} }
public ngAfterViewInit(): void { public ngAfterViewInit(): void {

View File

@@ -10,6 +10,7 @@ import { RouterModule, Routes } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; import { HasRoleModule } from 'src/app/directives/has-role/has-role.module';
import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module';
import { InfoSectionModule } from 'src/app/modules/info-section/info-section.module';
import { PaginatorModule } from 'src/app/modules/paginator/paginator.module'; import { PaginatorModule } from 'src/app/modules/paginator/paginator.module';
import { RefreshTableModule } from 'src/app/modules/refresh-table/refresh-table.module'; import { RefreshTableModule } from 'src/app/modules/refresh-table/refresh-table.module';
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';
@@ -47,6 +48,7 @@ const routes: Routes = [
HasRolePipeModule, HasRolePipeModule,
RefreshTableModule, RefreshTableModule,
MatTooltipModule, MatTooltipModule,
InfoSectionModule,
], ],
}) })
export class MembershipDetailModule { } export class MembershipDetailModule { }

View File

@@ -98,7 +98,7 @@
span { span {
max-width: 30px; max-width: 30px;
text-overflow: ellipsis; text-overflow: ellipsis;
font-weight: 800; font-weight: 300;
display: block; display: block;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;

View File

@@ -55,7 +55,7 @@ export class MembershipsComponent implements OnInit {
public async loadManager(userId: string): Promise<void> { public async loadManager(userId: string): Promise<void> {
if (this.auth) { if (this.auth) {
this.authService.listMyUserGrants(100, 0, []).then(resp => { this.authService.listMyMemberships(100, 0, []).then(resp => {
this.memberships = resp.resultList; this.memberships = resp.resultList;
this.totalResult = resp.details?.totalResult || 0; this.totalResult = resp.details?.totalResult || 0;
this.loading = false; this.loading = false;

View File

@@ -27,6 +27,8 @@ import {
GetCustomLoginTextsResponse, GetCustomLoginTextsResponse,
GetCustomOrgIAMPolicyRequest, GetCustomOrgIAMPolicyRequest,
GetCustomOrgIAMPolicyResponse, GetCustomOrgIAMPolicyResponse,
GetCustomPasswordlessRegistrationMessageTextRequest,
GetCustomPasswordlessRegistrationMessageTextResponse,
GetCustomPasswordResetMessageTextRequest, GetCustomPasswordResetMessageTextRequest,
GetCustomPasswordResetMessageTextResponse, GetCustomPasswordResetMessageTextResponse,
GetCustomVerifyEmailMessageTextRequest, GetCustomVerifyEmailMessageTextRequest,
@@ -41,6 +43,8 @@ import {
GetDefaultInitMessageTextResponse, GetDefaultInitMessageTextResponse,
GetDefaultLoginTextsRequest, GetDefaultLoginTextsRequest,
GetDefaultLoginTextsResponse, GetDefaultLoginTextsResponse,
GetDefaultPasswordlessRegistrationMessageTextRequest,
GetDefaultPasswordlessRegistrationMessageTextResponse,
GetDefaultPasswordResetMessageTextRequest, GetDefaultPasswordResetMessageTextRequest,
GetDefaultPasswordResetMessageTextResponse, GetDefaultPasswordResetMessageTextResponse,
GetDefaultVerifyEmailMessageTextRequest, GetDefaultVerifyEmailMessageTextRequest,
@@ -124,6 +128,8 @@ import {
SetDefaultFeaturesResponse, SetDefaultFeaturesResponse,
SetDefaultInitMessageTextRequest, SetDefaultInitMessageTextRequest,
SetDefaultInitMessageTextResponse, SetDefaultInitMessageTextResponse,
SetDefaultPasswordlessRegistrationMessageTextRequest,
SetDefaultPasswordlessRegistrationMessageTextResponse,
SetDefaultPasswordResetMessageTextRequest, SetDefaultPasswordResetMessageTextRequest,
SetDefaultPasswordResetMessageTextResponse, SetDefaultPasswordResetMessageTextResponse,
SetDefaultVerifyEmailMessageTextRequest, SetDefaultVerifyEmailMessageTextRequest,
@@ -275,6 +281,22 @@ export class AdminService {
return this.grpcService.admin.setDefaultDomainClaimedMessageText(req, null).then(resp => resp.toObject()); return this.grpcService.admin.setDefaultDomainClaimedMessageText(req, null).then(resp => resp.toObject());
} }
public getDefaultPasswordlessRegistrationMessageText(req: GetDefaultPasswordlessRegistrationMessageTextRequest):
Promise<GetDefaultPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.admin.getDefaultPasswordlessRegistrationMessageText(req, null).then(resp => resp.toObject());
}
public getCustomPasswordlessRegistrationMessageText(req: GetCustomPasswordlessRegistrationMessageTextRequest):
Promise<GetCustomPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.admin.getCustomPasswordlessRegistrationMessageText(req, null).then(resp => resp.toObject());
}
public setDefaultPasswordlessRegistrationMessageText(req: SetDefaultPasswordlessRegistrationMessageTextRequest):
Promise<SetDefaultPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.admin.setDefaultPasswordlessRegistrationMessageText(req, null).then(resp => resp.toObject());
}
public SetUpOrg( public SetUpOrg(
org: SetUpOrgRequest.Org, org: SetUpOrgRequest.Org,
human: SetUpOrgRequest.Human, human: SetUpOrgRequest.Human,

View File

@@ -26,6 +26,8 @@ import {
ListMyAuthFactorsResponse, ListMyAuthFactorsResponse,
ListMyLinkedIDPsRequest, ListMyLinkedIDPsRequest,
ListMyLinkedIDPsResponse, ListMyLinkedIDPsResponse,
ListMyMembershipsRequest,
ListMyMembershipsResponse,
ListMyPasswordlessRequest, ListMyPasswordlessRequest,
ListMyPasswordlessResponse, ListMyPasswordlessResponse,
ListMyProjectOrgsRequest, ListMyProjectOrgsRequest,
@@ -78,7 +80,7 @@ import {
import { ChangeQuery } from '../proto/generated/zitadel/change_pb'; import { ChangeQuery } from '../proto/generated/zitadel/change_pb';
import { ListQuery } from '../proto/generated/zitadel/object_pb'; import { ListQuery } from '../proto/generated/zitadel/object_pb';
import { Org, OrgQuery } from '../proto/generated/zitadel/org_pb'; import { Org, OrgQuery } from '../proto/generated/zitadel/org_pb';
import { Gender, User, WebAuthNVerification } from '../proto/generated/zitadel/user_pb'; import { Gender, MembershipQuery, User, WebAuthNVerification } from '../proto/generated/zitadel/user_pb';
import { GrpcService } from './grpc.service'; import { GrpcService } from './grpc.service';
import { StorageKey, StorageService } from './storage.service'; import { StorageKey, StorageService } from './storage.service';
@@ -350,6 +352,24 @@ export class GrpcAuthService {
return this.grpcService.auth.listMyUserGrants(req, null).then(resp => resp.toObject()); return this.grpcService.auth.listMyUserGrants(req, null).then(resp => resp.toObject());
} }
public listMyMemberships(limit: number, offset: number,
queryList?: MembershipQuery[],
): Promise<ListMyMembershipsResponse.AsObject> {
const req = new ListMyMembershipsRequest();
const metadata = new ListQuery();
if (limit) {
metadata.setLimit(limit);
}
if (offset) {
metadata.setOffset(offset);
}
if (queryList) {
req.setQueriesList(queryList);
}
req.setQuery(metadata);
return this.grpcService.auth.listMyMemberships(req, null).then(resp => resp.toObject());
}
public getMyEmail(): Promise<GetMyEmailResponse.AsObject> { public getMyEmail(): Promise<GetMyEmailResponse.AsObject> {
const req = new GetMyEmailRequest(); const req = new GetMyEmailRequest();
return this.grpcService.auth.getMyEmail(req, null).then(resp => resp.toObject()); return this.grpcService.auth.getMyEmail(req, null).then(resp => resp.toObject());

View File

@@ -3,7 +3,6 @@ import { Empty } from 'google-protobuf/google/protobuf/empty_pb';
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { GetDefaultDomainClaimedMessageTextRequest } from '../proto/generated/zitadel/admin_pb';
import { AppQuery } from '../proto/generated/zitadel/app_pb'; import { AppQuery } from '../proto/generated/zitadel/app_pb';
import { KeyType } from '../proto/generated/zitadel/auth_n_key_pb'; import { KeyType } from '../proto/generated/zitadel/auth_n_key_pb';
import { ChangeQuery } from '../proto/generated/zitadel/change_pb'; import { ChangeQuery } from '../proto/generated/zitadel/change_pb';
@@ -87,12 +86,15 @@ import {
GetCustomInitMessageTextResponse, GetCustomInitMessageTextResponse,
GetCustomLoginTextsRequest, GetCustomLoginTextsRequest,
GetCustomLoginTextsResponse, GetCustomLoginTextsResponse,
GetCustomPasswordlessRegistrationMessageTextRequest,
GetCustomPasswordlessRegistrationMessageTextResponse,
GetCustomPasswordResetMessageTextRequest, GetCustomPasswordResetMessageTextRequest,
GetCustomPasswordResetMessageTextResponse, GetCustomPasswordResetMessageTextResponse,
GetCustomVerifyEmailMessageTextRequest, GetCustomVerifyEmailMessageTextRequest,
GetCustomVerifyEmailMessageTextResponse, GetCustomVerifyEmailMessageTextResponse,
GetCustomVerifyPhoneMessageTextRequest, GetCustomVerifyPhoneMessageTextRequest,
GetCustomVerifyPhoneMessageTextResponse, GetCustomVerifyPhoneMessageTextResponse,
GetDefaultDomainClaimedMessageTextRequest,
GetDefaultDomainClaimedMessageTextResponse, GetDefaultDomainClaimedMessageTextResponse,
GetDefaultInitMessageTextRequest, GetDefaultInitMessageTextRequest,
GetDefaultInitMessageTextResponse, GetDefaultInitMessageTextResponse,
@@ -102,6 +104,8 @@ import {
GetDefaultLoginTextsResponse, GetDefaultLoginTextsResponse,
GetDefaultPasswordComplexityPolicyRequest, GetDefaultPasswordComplexityPolicyRequest,
GetDefaultPasswordComplexityPolicyResponse, GetDefaultPasswordComplexityPolicyResponse,
GetDefaultPasswordlessRegistrationMessageTextRequest,
GetDefaultPasswordlessRegistrationMessageTextResponse,
GetDefaultPasswordResetMessageTextRequest, GetDefaultPasswordResetMessageTextRequest,
GetDefaultPasswordResetMessageTextResponse, GetDefaultPasswordResetMessageTextResponse,
GetDefaultVerifyEmailMessageTextRequest, GetDefaultVerifyEmailMessageTextRequest,
@@ -290,6 +294,8 @@ import {
ResetCustomInitMessageTextToDefaultResponse, ResetCustomInitMessageTextToDefaultResponse,
ResetCustomLoginTextsToDefaultRequest, ResetCustomLoginTextsToDefaultRequest,
ResetCustomLoginTextsToDefaultResponse, ResetCustomLoginTextsToDefaultResponse,
ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest,
ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse,
ResetCustomPasswordResetMessageTextToDefaultRequest, ResetCustomPasswordResetMessageTextToDefaultRequest,
ResetCustomPasswordResetMessageTextToDefaultResponse, ResetCustomPasswordResetMessageTextToDefaultResponse,
ResetCustomVerifyEmailMessageTextToDefaultRequest, ResetCustomVerifyEmailMessageTextToDefaultRequest,
@@ -317,6 +323,8 @@ import {
SetCustomInitMessageTextResponse, SetCustomInitMessageTextResponse,
SetCustomLoginTextsRequest, SetCustomLoginTextsRequest,
SetCustomLoginTextsResponse, SetCustomLoginTextsResponse,
SetCustomPasswordlessRegistrationMessageTextRequest,
SetCustomPasswordlessRegistrationMessageTextResponse,
SetCustomPasswordResetMessageTextRequest, SetCustomPasswordResetMessageTextRequest,
SetCustomPasswordResetMessageTextResponse, SetCustomPasswordResetMessageTextResponse,
SetCustomVerifyEmailMessageTextRequest, SetCustomVerifyEmailMessageTextRequest,
@@ -540,6 +548,30 @@ export class ManagementService {
return this.grpcService.mgmt.resetCustomDomainClaimedMessageTextToDefault(req, null).then(resp => resp.toObject()); return this.grpcService.mgmt.resetCustomDomainClaimedMessageTextToDefault(req, null).then(resp => resp.toObject());
} }
public getDefaultPasswordlessRegistrationMessageText(req: GetDefaultPasswordlessRegistrationMessageTextRequest):
Promise<GetDefaultPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getDefaultPasswordlessRegistrationMessageText(req, null).then(resp => resp.toObject());
}
public getCustomPasswordlessRegistrationMessageText(req: GetCustomPasswordlessRegistrationMessageTextRequest):
Promise<GetCustomPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getCustomPasswordlessRegistrationMessageText(req, null).then(resp => resp.toObject());
}
public setCustomPasswordlessRegistrationMessageCustomText(req: SetCustomPasswordlessRegistrationMessageTextRequest):
Promise<SetCustomPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.mgmt.setCustomPasswordlessRegistrationMessageCustomText(req, null).then(resp => resp.toObject());
}
public resetCustomPasswordlessRegistrationMessageTextToDefault(lang: string):
Promise<ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.mgmt.resetCustomPasswordlessRegistrationMessageTextToDefault(req, null)
.then(resp => resp.toObject());
}
public listOrgIDPs( public listOrgIDPs(
limit?: number, limit?: number,
offset?: number, offset?: number,

View File

@@ -481,6 +481,8 @@
"MEMBERSHIPS": { "MEMBERSHIPS": {
"TITLE": "ZITADEL Manager-Rollen", "TITLE": "ZITADEL Manager-Rollen",
"DESCRIPTION": "Dies sind alle Mitgliedschaften des Benutzers. Du kannst die entsprechenden Rechte auch auf der Organisations-, Projekt-, oder IAM-Detailseite aufrufen und modifizieren.", "DESCRIPTION": "Dies sind alle Mitgliedschaften des Benutzers. Du kannst die entsprechenden Rechte auch auf der Organisations-, Projekt-, oder IAM-Detailseite aufrufen und modifizieren.",
"ORGCONTEXT":"Sie sehen alle Organisationen und Projekte, die mit der aktuell gewählten Organisation in Verbindung stehen.",
"USERCONTEXT":"Sie sehen alle Organisationen und Projekte auf denen Sie berechtigt sind inklusive aller zur Auswahl stehenden Organisationen.",
"CREATIONDATE": "Erstelldatum", "CREATIONDATE": "Erstelldatum",
"CHANGEDATE": "Letzte Änderung", "CHANGEDATE": "Letzte Änderung",
"DISPLAYNAME": "Anzeigename", "DISPLAYNAME": "Anzeigename",
@@ -690,6 +692,9 @@
"RELEASE":"Jetzt loslassen", "RELEASE":"Jetzt loslassen",
"DROPFONT":"Fontdatei hier ablegen", "DROPFONT":"Fontdatei hier ablegen",
"RELEASEFONT":"Jetzt loslassen", "RELEASEFONT":"Jetzt loslassen",
"MAXSIZE":"Die maximale Grösse von Uploads ist mit 524kB begrenzt",
"MAXSIZEEXCEEDED":"Maximale Grösse von 524kB überschritten",
"FONTINLOGINONLY":"Die Schriftart wird momentan nur im Login interface angezeigt.",
"PREVIEW": { "PREVIEW": {
"TITLE":"Anmeldung", "TITLE":"Anmeldung",
"SECOND":"mit ZITADEL-Konto anmelden.", "SECOND":"mit ZITADEL-Konto anmelden.",
@@ -770,7 +775,6 @@
"passwordChangeText":"Passwortwechsel", "passwordChangeText":"Passwortwechsel",
"passwordResetDoneText":"Passwort zurücksetzen erfolgreich", "passwordResetDoneText":"Passwort zurücksetzen erfolgreich",
"passwordText":"Passwort", "passwordText":"Passwort",
"passwordlessText":"Passwortlose Authentifizierung",
"registrationOptionText":"Registrierungsoptionen", "registrationOptionText":"Registrierungsoptionen",
"registrationOrgText":"Organisation registrieren", "registrationOrgText":"Organisation registrieren",
"registrationUserText":"Benutzer registrieren", "registrationUserText":"Benutzer registrieren",
@@ -779,7 +783,11 @@
"usernameChangeDoneText":"Benutzernamenwechsel erfolgreich", "usernameChangeDoneText":"Benutzernamenwechsel erfolgreich",
"usernameChangeText":"Benutzernamenwechsel", "usernameChangeText":"Benutzernamenwechsel",
"verifyMfaOtpText":"OTP Verifikation", "verifyMfaOtpText":"OTP Verifikation",
"verifyMfaU2fText":"Universeller Zweitfaktor Verifikation" "verifyMfaU2fText":"Universeller Zweitfaktor Verifikation",
"passwordlessPromptText":"Passwordless Aufforderung",
"passwordlessRegistrationDoneText":"Passwordless setzen erfolgreich",
"passwordlessRegistrationText":"Passwordless Registrierung",
"passwordlessText":"Passwordless"
} }
}, },
"MESSAGE_TEXTS": { "MESSAGE_TEXTS": {
@@ -790,13 +798,25 @@
"VE":"Emailverifikation", "VE":"Emailverifikation",
"VP":"Telefonnummerverifikation", "VP":"Telefonnummerverifikation",
"PR":"Password Wiederherstellung", "PR":"Password Wiederherstellung",
"DC":"Domainbeanspruchung" "DC":"Domainbeanspruchung",
"PL":"Passwordless"
}, },
"CHIPS": { "CHIPS": {
"firstname":"Vorname", "firstname":"Vorname",
"lastname":"Nachname", "lastname":"Nachname",
"code":"Code", "code":"Code",
"preferredLoginName":"Bevorzugter Anmeldename" "preferredLoginName":"Bevorzugter Anmeldename",
"displayName":"Anzeigename",
"nickName":"Spitzname",
"loginnames":"Loginnamen",
"domain":"Domain",
"lastEmail":"Letzte email",
"lastPhone":"Letzte Telefonnummer",
"verifiedEmail":"Verifizierte email",
"verifiedPhone":"Verifizierte Telefonnummer",
"changedate":"Änderungsdatum",
"username":"Username",
"tempUsername":"Temp. Username"
}, },
"TOAST": { "TOAST": {
"UPDATED":"Benutzerdefinierte Texte gespeichert." "UPDATED":"Benutzerdefinierte Texte gespeichert."

View File

@@ -481,6 +481,8 @@
"MEMBERSHIPS": { "MEMBERSHIPS": {
"TITLE": "ZITADEL Manager Roles", "TITLE": "ZITADEL Manager Roles",
"DESCRIPTION": "These are all member grants of the user. You can modify them also on organisation, project, or IAM detail pages.", "DESCRIPTION": "These are all member grants of the user. You can modify them also on organisation, project, or IAM detail pages.",
"ORGCONTEXT":"You see all organizations and projects that are related to the currently selected organization.",
"USERCONTEXT":"You see all organizations and projects to which you are authorized. Including other organizations.",
"CREATIONDATE": "Creation Date", "CREATIONDATE": "Creation Date",
"CHANGEDATE": "Last Modified", "CHANGEDATE": "Last Modified",
"DISPLAYNAME": "Display Name", "DISPLAYNAME": "Display Name",
@@ -690,6 +692,9 @@
"RELEASE":"Release", "RELEASE":"Release",
"DROPFONT":"Drop fontfile here", "DROPFONT":"Drop fontfile here",
"RELEASEFONT":"Release", "RELEASEFONT":"Release",
"MAXSIZE":"The maximum size is limited to 524kB",
"MAXSIZEEXCEEDED":"Maximum size of 524kB exceeded.",
"FONTINLOGINONLY":"The font is currently only displayed in the login interface.",
"PREVIEW": { "PREVIEW": {
"TITLE":"Login", "TITLE":"Login",
"SECOND":"login with your ZITADEL-Account.", "SECOND":"login with your ZITADEL-Account.",
@@ -772,7 +777,6 @@
"passwordChangeText":"Password change", "passwordChangeText":"Password change",
"passwordResetDoneText":"Password reset done", "passwordResetDoneText":"Password reset done",
"passwordText":"Password", "passwordText":"Password",
"passwordlessText":"Passwordless",
"registrationOptionText":"Registration Options", "registrationOptionText":"Registration Options",
"registrationOrgText":"Register Org", "registrationOrgText":"Register Org",
"registrationUserText":"Register User", "registrationUserText":"Register User",
@@ -781,7 +785,11 @@
"usernameChangeDoneText":"Username change done", "usernameChangeDoneText":"Username change done",
"usernameChangeText":"Username change", "usernameChangeText":"Username change",
"verifyMfaOtpText":"Verify OTP", "verifyMfaOtpText":"Verify OTP",
"verifyMfaU2fText":"Verify Universal Second Factor" "verifyMfaU2fText":"Verify Universal Second Factor",
"passwordlessPromptText":"Passwordless Prompt",
"passwordlessRegistrationDoneText":"Passwordless Registration Done",
"passwordlessRegistrationText":"Passwordless Registration",
"passwordlessText":"Passwordless"
} }
}, },
"MESSAGE_TEXTS": { "MESSAGE_TEXTS": {
@@ -792,13 +800,25 @@
"VE":"Verify Email", "VE":"Verify Email",
"VP":"Verify Phone", "VP":"Verify Phone",
"PR":"Password Reset", "PR":"Password Reset",
"DC":"Domain Claim" "DC":"Domain Claim",
"PL":"Passwordless"
}, },
"CHIPS": { "CHIPS": {
"firstname":"Firstname", "firstname":"Firstname",
"lastname":"Lastname", "lastname":"Lastname",
"code":"Code", "code":"Code",
"preferredLoginName":"Preferred Login Name" "preferredLoginName":"Preferred Login Name",
"displayName":"Displayname",
"nickName":"Nickname",
"loginnames":"Login names",
"domain":"Domain",
"lastEmail":"Last email",
"lastPhone":"Last phone",
"verifiedEmail":"Verified email",
"verifiedPhone":"Verified phone",
"changedate":"Change date",
"username":"Username",
"tempUsername":"Temp username"
}, },
"TOAST": { "TOAST": {
"UPDATED":"Custom Texts saved." "UPDATED":"Custom Texts saved."
@@ -831,7 +851,7 @@
"HIDEPASSWORDRESET_DESC": "If the option is selected, the user can't reset his password in the login process.", "HIDEPASSWORDRESET_DESC": "If the option is selected, the user can't reset his password in the login process.",
"HIDELOGINNAMESUFFIX":"Hide Loginname suffix", "HIDELOGINNAMESUFFIX":"Hide Loginname suffix",
"ERRORMSGPOPUP":"Show Error in Dialog", "ERRORMSGPOPUP":"Show Error in Dialog",
"DISABLEWATERMARK":"Disable Watermark" "DISABLEWATERMARK":"Hide Watermark"
}, },
"RESET": "Reset Policy", "RESET": "Reset Policy",
"CREATECUSTOM": "Create Custom Policy", "CREATECUSTOM": "Create Custom Policy",

View File

@@ -1,6 +1,3 @@
// Custom Theming for Angular Material
// For more information: https://material.angular.io/guide/theming
@use '~@angular/material' as mat; @use '~@angular/material' as mat;
@import './component-themes'; @import './component-themes';
@@ -332,12 +329,6 @@ $caos-light-app-theme: (
$custom-typography: mat.define-typography-config($font-family: 'Lato'); $custom-typography: mat.define-typography-config($font-family: 'Lato');
@include mat.core($custom-typography); @include mat.core($custom-typography);
// textarea {
// font-family: 'Lato';
// }
// default theme
@include component-themes($caos-dark-app-theme); @include component-themes($caos-dark-app-theme);
@include mat.all-component-themes($caos-dark-app-theme); @include mat.all-component-themes($caos-dark-app-theme);

View File

@@ -840,10 +840,25 @@ func (repo *AuthRequestRepo) getLockoutPolicy(ctx context.Context, orgID string)
policy, err := repo.View.LockoutPolicyByAggregateID(orgID) policy, err := repo.View.LockoutPolicyByAggregateID(orgID)
if errors.IsNotFound(err) { if errors.IsNotFound(err) {
policy, err = repo.View.LockoutPolicyByAggregateID(repo.IAMID) policy, err = repo.View.LockoutPolicyByAggregateID(repo.IAMID)
if err != nil { if err != nil && !errors.IsNotFound(err) {
return nil, err return nil, err
} }
if err == nil {
return policy.ToDomain(), nil
}
policy = &iam_view_model.LockoutPolicyView{}
events, err := repo.Eventstore.FilterEvents(ctx, es_models.NewSearchQuery().
AggregateIDFilter(repo.IAMID).
AggregateTypeFilter(iam.AggregateType).
EventTypesFilter(es_models.EventType(iam.LockoutPolicyAddedEventType), es_models.EventType(iam.LockoutPolicyChangedEventType)))
if err != nil || len(events) == 0 {
return nil, errors.ThrowNotFound(err, "EVENT-Gfgr2", "IAM.LockoutPolicy.NotExisting")
}
policy.Default = true policy.Default = true
for _, event := range events {
policy.AppendEvent(event)
}
return policy.ToDomain(), nil
} }
if err != nil { if err != nil {
return nil, err return nil, err