2020-07-20 15:23:29 +02:00
|
|
|
import { PlatformLocation } from '@angular/common';
|
2020-07-08 13:56:37 +02:00
|
|
|
import { Injectable } from '@angular/core';
|
2022-05-31 09:08:47 +02:00
|
|
|
import { TranslateService } from '@ngx-translate/core';
|
2020-08-29 10:43:35 +02:00
|
|
|
import { AuthConfig } from 'angular-oauth2-oidc';
|
2025-02-17 19:25:46 +01:00
|
|
|
import { catchError, firstValueFrom, switchMap, tap } from 'rxjs';
|
2020-07-08 13:56:37 +02:00
|
|
|
|
feat: protos refactoring
* start with user
* user first try done in all services
* user, org, idp for discussion
* remove unused stuff
* bla
* dockerbuild
* rename search, get multiple to list...
* add annotation
* update proto dependencies
* update proto dependencies
* change proto imports
* replace all old imports
* fix go out
* remove unused lines
* correct protoc flags
* grpc and openapi flags
* go out source path relative
* -p
* remove dead code
* sourcepath relative
* ls
* is onenapi the problem?
* hobla
* authoption output
* wrong field name
* gopf
* correct option, add correct flags
* small improvments
* SIMPLYFY
* relative path
* gopf bin ich en tubel
* correct path
* default policies in admin
* grpc generation in one file
* remove non ascii
* metadata on manipulations
* correct auth_option import
* fixes
* larry
* idp provider to idp
* fix generate
* admin and auth nearly done
* admin and auth nearly done
* gen
* healthz
* imports
* deleted too much imports
* fix org
* add import
* imports
* import
* naming
* auth_opt
* gopf
* management
* imports
* _TYPE_UNSPECIFIED
* improts
* auth opts
* management policies
* imports
* passwordlessType to MFAType
* auth_opt
* add user grant calls
* add missing messages
* result
* fix option
* improvements
* ids
* fix http
* imports
* fixes
* fields
* body
* add fields
* remove wrong member query
* fix request response
* fixes
* add copy files
* variable versions
* generate all files
* improvements
* add dependencies
* factors
* user session
* oidc information, iam
* remove unused file
* changes
* enums
* dockerfile
* fix build
* remove unused folder
* update readme for build
* move old server impl
* add event type to change
* some changes
* start admin
* remove wrong field
* admin only list calls missing
* fix proto numbers
* surprisingly it compiles
* service ts changes
* admin mgmt
* mgmt
* auth manipulation and gets done, lists missing
* validations and some field changes
* validations
* enum validations
* remove todo
* move proto files to proto/zitadel
* change proto path in dockerfile
* it compiles!
* add validate import
* remove duplicate import
* fix protos
* fix import
* tests
* cleanup
* remove unimplemented methods
* iam member multiple queries
* all auth and admin calls
* add initial password on crate human
* message names
* management user server
* machine done
* fix: todos (#1346)
* fix: pub sub in new eventstore
* fix: todos
* fix: todos
* fix: todos
* fix: todos
* fix: todos
* fix tests
* fix: search method domain
* admin service, user import type typescript
* admin changes
* admin changes
* fix: search method domain
* more user grpc and begin org, fix configs
* fix: return object details
* org grpc
* remove creation date add details
* app
* fix: return object details
* fix: return object details
* mgmt service, project members
* app
* fix: convert policies
* project, members, granted projects, searches
* fix: convert usergrants
* fix: convert usergrants
* auth user detail, user detail, mfa, second factor, auth
* fix: convert usergrants
* mfa, memberships, password, owned proj detail
* fix: convert usergrants
* project grant
* missing details
* changes, userview
* idp table, keys
* org list and user table filter
* unify rest paths (#1381)
* unify rest paths
* post for all searches,
mfa to multi_factor,
secondfactor to second_factor
* remove v1
* fix tests
* rename api client key to app key
* machine keys, age policy
* user list, machine keys, changes
* fix: org states
* add default flag to policy
* second factor to type
* idp id
* app type
* unify ListQuery, ListDetails, ObjectDetails field names
* user grants, apps, memberships
* fix type params
* metadata to detail, linke idps
* api create, membership, app detail, create
* idp, app, policy
* queries, multi -> auth factors and missing fields
* update converters
* provider to user, remove old mgmt refs
* temp remove authfactor dialog, build finish
Co-authored-by: Max Peintner <max@caos.ch>
Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
2021-03-09 10:30:11 +01:00
|
|
|
import { AdminServiceClient } from '../proto/generated/zitadel/AdminServiceClientPb';
|
|
|
|
|
import { AuthServiceClient } from '../proto/generated/zitadel/AuthServiceClientPb';
|
|
|
|
|
import { ManagementServiceClient } from '../proto/generated/zitadel/ManagementServiceClientPb';
|
2023-06-09 15:14:15 +02:00
|
|
|
import { fallbackLanguage, supportedLanguagesRegexp } from '../utils/language';
|
2020-08-29 10:43:35 +02:00
|
|
|
import { AuthenticationService } from './authentication.service';
|
2023-05-19 12:48:39 +02:00
|
|
|
import { EnvironmentService } from './environment.service';
|
|
|
|
|
import { ExhaustedService } from './exhausted.service';
|
2025-02-17 19:25:46 +01:00
|
|
|
import { AuthInterceptor, AuthInterceptorProvider, NewConnectWebAuthInterceptor } from './interceptors/auth.interceptor';
|
2023-05-19 12:48:39 +02:00
|
|
|
import { ExhaustedGrpcInterceptor } from './interceptors/exhausted.grpc.interceptor';
|
2020-10-08 14:49:47 +02:00
|
|
|
import { I18nInterceptor } from './interceptors/i18n.interceptor';
|
2025-03-14 07:05:45 +01:00
|
|
|
import { NewConnectWebOrgInterceptor, OrgInterceptor, OrgInterceptorProvider } from './interceptors/org.interceptor';
|
2020-08-29 10:43:35 +02:00
|
|
|
import { StorageService } from './storage.service';
|
2025-02-17 19:25:46 +01:00
|
|
|
import { UserServiceClient } from '../proto/generated/zitadel/user/v2/User_serviceServiceClientPb';
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
import { createUserServiceClient } from '@zitadel/client/v2';
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
import { createAuthServiceClient, createManagementServiceClient } from '@zitadel/client/v1';
|
|
|
|
|
import { createGrpcWebTransport } from '@connectrpc/connect-web';
|
|
|
|
|
import { FeatureServiceClient } from '../proto/generated/zitadel/feature/v2/Feature_serviceServiceClientPb';
|
2020-07-08 13:56:37 +02:00
|
|
|
|
|
|
|
|
@Injectable({
|
feat(console): update deps, alternative hash function with fixed colors, use preferrenLoginName for hashing, fix iam write permissions, user img upload (#1846)
* chore(deps-dev): bump @types/jasmine from 3.6.9 to 3.7.7 in /console (#1824)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.6.9 to 3.7.7.
- [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 google-protobuf from 3.15.8 to 3.17.2 in /console (#1823)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.15.8 to 3.17.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.15.8...v3.17.2)
---
updated-dependencies:
- dependency-name: google-protobuf
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): bump @angular/animations from 12.0.0 to 12.0.3 in /console (#1821)
Bumps [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) from 12.0.0 to 12.0.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.0.3/packages/animations)
---
updated-dependencies:
- dependency-name: "@angular/animations"
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/material from 12.0.0 to 12.0.3 in /console (#1819)
Bumps [@angular/material](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material"
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-dev): bump prettier from 2.2.1 to 2.3.1 in /console (#1818)
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.1)
---
updated-dependencies:
- dependency-name: prettier
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/platform-browser-dynamic in /console (#1817)
Bumps [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) from 12.0.0 to 12.0.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.0.3/packages/platform-browser-dynamic)
---
updated-dependencies:
- dependency-name: "@angular/platform-browser-dynamic"
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-dev): bump @types/node from 14.14.37 to 15.12.1 in /console (#1815)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 15.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/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): bump @angular/common from 12.0.0 to 12.0.3 in /console (#1814)
Bumps [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) from 12.0.0 to 12.0.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.0.3/packages/common)
---
updated-dependencies:
- dependency-name: "@angular/common"
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/material-moment-adapter from 12.0.0 to 12.0.3 in /console (#1816)
* chore(deps): bump @angular/material-moment-adapter in /console
Bumps [@angular/material-moment-adapter](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material-moment-adapter"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* sort
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <max@caos.ch>
* chore(deps-dev): bump @angular/language-service in /console (#1822)
Bumps [@angular/language-service](https://github.com/angular/angular/tree/HEAD/packages/language-service) from 12.0.0 to 12.0.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.0.3/packages/language-service)
---
updated-dependencies:
- dependency-name: "@angular/language-service"
dependency-type: direct:development
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>
Co-authored-by: Max Peintner <max@caos.ch>
* image cropper
* fix: avatar bg colors, preferred username, login script
* lint
* membership color
* rem logs
* profile picture component
* pic comp
* dialog tirgger btn
* trigger dialog, styles
* lock
* interceptor for org, upload, remove
* tooltip
* lint
* stylelint
* generate same credentials of username as in login
* deletepic
* fix disable privatelabeling on missing feature, i18n
* lint
* stylelint
* block loading images if no feature
* lint
* optimize feature check
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-11 11:15:04 +02:00
|
|
|
providedIn: 'root',
|
2020-07-08 13:56:37 +02:00
|
|
|
})
|
|
|
|
|
export class GrpcService {
|
feat(console): update deps, alternative hash function with fixed colors, use preferrenLoginName for hashing, fix iam write permissions, user img upload (#1846)
* chore(deps-dev): bump @types/jasmine from 3.6.9 to 3.7.7 in /console (#1824)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.6.9 to 3.7.7.
- [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 google-protobuf from 3.15.8 to 3.17.2 in /console (#1823)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.15.8 to 3.17.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.15.8...v3.17.2)
---
updated-dependencies:
- dependency-name: google-protobuf
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): bump @angular/animations from 12.0.0 to 12.0.3 in /console (#1821)
Bumps [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) from 12.0.0 to 12.0.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.0.3/packages/animations)
---
updated-dependencies:
- dependency-name: "@angular/animations"
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/material from 12.0.0 to 12.0.3 in /console (#1819)
Bumps [@angular/material](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material"
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-dev): bump prettier from 2.2.1 to 2.3.1 in /console (#1818)
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.1)
---
updated-dependencies:
- dependency-name: prettier
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/platform-browser-dynamic in /console (#1817)
Bumps [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) from 12.0.0 to 12.0.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.0.3/packages/platform-browser-dynamic)
---
updated-dependencies:
- dependency-name: "@angular/platform-browser-dynamic"
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-dev): bump @types/node from 14.14.37 to 15.12.1 in /console (#1815)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 15.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/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): bump @angular/common from 12.0.0 to 12.0.3 in /console (#1814)
Bumps [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) from 12.0.0 to 12.0.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.0.3/packages/common)
---
updated-dependencies:
- dependency-name: "@angular/common"
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/material-moment-adapter from 12.0.0 to 12.0.3 in /console (#1816)
* chore(deps): bump @angular/material-moment-adapter in /console
Bumps [@angular/material-moment-adapter](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material-moment-adapter"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* sort
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <max@caos.ch>
* chore(deps-dev): bump @angular/language-service in /console (#1822)
Bumps [@angular/language-service](https://github.com/angular/angular/tree/HEAD/packages/language-service) from 12.0.0 to 12.0.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.0.3/packages/language-service)
---
updated-dependencies:
- dependency-name: "@angular/language-service"
dependency-type: direct:development
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>
Co-authored-by: Max Peintner <max@caos.ch>
* image cropper
* fix: avatar bg colors, preferred username, login script
* lint
* membership color
* rem logs
* profile picture component
* pic comp
* dialog tirgger btn
* trigger dialog, styles
* lock
* interceptor for org, upload, remove
* tooltip
* lint
* stylelint
* generate same credentials of username as in login
* deletepic
* fix disable privatelabeling on missing feature, i18n
* lint
* stylelint
* block loading images if no feature
* lint
* optimize feature check
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-11 11:15:04 +02:00
|
|
|
public auth!: AuthServiceClient;
|
|
|
|
|
public mgmt!: ManagementServiceClient;
|
|
|
|
|
public admin!: AdminServiceClient;
|
2024-04-10 18:30:58 +02:00
|
|
|
public feature!: FeatureServiceClient;
|
2025-02-17 19:25:46 +01:00
|
|
|
public user!: UserServiceClient;
|
|
|
|
|
public userNew!: ReturnType<typeof createUserServiceClient>;
|
|
|
|
|
public mgmtNew!: ReturnType<typeof createManagementServiceClient>;
|
|
|
|
|
public authNew!: ReturnType<typeof createAuthServiceClient>;
|
2020-07-08 13:56:37 +02:00
|
|
|
|
feat(console): update deps, alternative hash function with fixed colors, use preferrenLoginName for hashing, fix iam write permissions, user img upload (#1846)
* chore(deps-dev): bump @types/jasmine from 3.6.9 to 3.7.7 in /console (#1824)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.6.9 to 3.7.7.
- [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 google-protobuf from 3.15.8 to 3.17.2 in /console (#1823)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.15.8 to 3.17.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.15.8...v3.17.2)
---
updated-dependencies:
- dependency-name: google-protobuf
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): bump @angular/animations from 12.0.0 to 12.0.3 in /console (#1821)
Bumps [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) from 12.0.0 to 12.0.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.0.3/packages/animations)
---
updated-dependencies:
- dependency-name: "@angular/animations"
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/material from 12.0.0 to 12.0.3 in /console (#1819)
Bumps [@angular/material](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material"
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-dev): bump prettier from 2.2.1 to 2.3.1 in /console (#1818)
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.1)
---
updated-dependencies:
- dependency-name: prettier
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/platform-browser-dynamic in /console (#1817)
Bumps [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) from 12.0.0 to 12.0.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.0.3/packages/platform-browser-dynamic)
---
updated-dependencies:
- dependency-name: "@angular/platform-browser-dynamic"
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-dev): bump @types/node from 14.14.37 to 15.12.1 in /console (#1815)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 15.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/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): bump @angular/common from 12.0.0 to 12.0.3 in /console (#1814)
Bumps [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) from 12.0.0 to 12.0.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.0.3/packages/common)
---
updated-dependencies:
- dependency-name: "@angular/common"
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/material-moment-adapter from 12.0.0 to 12.0.3 in /console (#1816)
* chore(deps): bump @angular/material-moment-adapter in /console
Bumps [@angular/material-moment-adapter](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material-moment-adapter"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* sort
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <max@caos.ch>
* chore(deps-dev): bump @angular/language-service in /console (#1822)
Bumps [@angular/language-service](https://github.com/angular/angular/tree/HEAD/packages/language-service) from 12.0.0 to 12.0.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.0.3/packages/language-service)
---
updated-dependencies:
- dependency-name: "@angular/language-service"
dependency-type: direct:development
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>
Co-authored-by: Max Peintner <max@caos.ch>
* image cropper
* fix: avatar bg colors, preferred username, login script
* lint
* membership color
* rem logs
* profile picture component
* pic comp
* dialog tirgger btn
* trigger dialog, styles
* lock
* interceptor for org, upload, remove
* tooltip
* lint
* stylelint
* generate same credentials of username as in login
* deletepic
* fix disable privatelabeling on missing feature, i18n
* lint
* stylelint
* block loading images if no feature
* lint
* optimize feature check
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-11 11:15:04 +02:00
|
|
|
constructor(
|
2025-02-17 19:25:46 +01:00
|
|
|
private readonly envService: EnvironmentService,
|
|
|
|
|
private readonly platformLocation: PlatformLocation,
|
|
|
|
|
private readonly authenticationService: AuthenticationService,
|
|
|
|
|
private readonly storageService: StorageService,
|
|
|
|
|
private readonly translate: TranslateService,
|
|
|
|
|
private readonly exhaustedService: ExhaustedService,
|
|
|
|
|
private readonly authInterceptor: AuthInterceptor,
|
|
|
|
|
private readonly authInterceptorProvider: AuthInterceptorProvider,
|
2025-03-14 07:05:45 +01:00
|
|
|
private readonly orgInterceptorProvider: OrgInterceptorProvider,
|
2021-11-02 09:03:02 +01:00
|
|
|
) {}
|
2020-07-08 13:56:37 +02:00
|
|
|
|
2023-05-19 12:48:39 +02:00
|
|
|
public loadAppEnvironment(): Promise<any> {
|
|
|
|
|
// We use the browser language until we can make API requests to get the users configured language.
|
2023-06-09 15:14:15 +02:00
|
|
|
|
|
|
|
|
const browserLanguage = this.translate.getBrowserLang();
|
|
|
|
|
const language = browserLanguage?.match(supportedLanguagesRegexp) ? browserLanguage : fallbackLanguage;
|
2025-02-17 19:25:46 +01:00
|
|
|
const init = this.translate.use(language || this.translate.defaultLang).pipe(
|
|
|
|
|
switchMap(() => this.envService.env),
|
|
|
|
|
tap((env) => {
|
|
|
|
|
if (!env?.api || !env?.issuer) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const interceptors = {
|
|
|
|
|
unaryInterceptors: [
|
|
|
|
|
new ExhaustedGrpcInterceptor(this.exhaustedService, this.envService),
|
2025-03-14 07:05:45 +01:00
|
|
|
new OrgInterceptor(this.orgInterceptorProvider),
|
2025-02-17 19:25:46 +01:00
|
|
|
this.authInterceptor,
|
|
|
|
|
new I18nInterceptor(this.translate),
|
|
|
|
|
],
|
|
|
|
|
};
|
2020-08-29 10:43:35 +02:00
|
|
|
|
2025-02-17 19:25:46 +01:00
|
|
|
this.auth = new AuthServiceClient(
|
|
|
|
|
env.api,
|
|
|
|
|
null,
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
interceptors,
|
|
|
|
|
);
|
|
|
|
|
this.mgmt = new ManagementServiceClient(
|
|
|
|
|
env.api,
|
|
|
|
|
null,
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
interceptors,
|
|
|
|
|
);
|
|
|
|
|
this.admin = new AdminServiceClient(
|
|
|
|
|
env.api,
|
|
|
|
|
null,
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
interceptors,
|
|
|
|
|
);
|
|
|
|
|
this.feature = new FeatureServiceClient(
|
|
|
|
|
env.api,
|
|
|
|
|
null,
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
interceptors,
|
|
|
|
|
);
|
|
|
|
|
this.user = new UserServiceClient(
|
|
|
|
|
env.api,
|
|
|
|
|
null,
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
interceptors,
|
|
|
|
|
);
|
2020-08-29 10:43:35 +02:00
|
|
|
|
2025-02-17 19:25:46 +01:00
|
|
|
const transport = createGrpcWebTransport({
|
|
|
|
|
baseUrl: env.api,
|
|
|
|
|
interceptors: [NewConnectWebAuthInterceptor(this.authInterceptorProvider)],
|
|
|
|
|
});
|
2025-03-14 07:05:45 +01:00
|
|
|
const transportOldAPIs = createGrpcWebTransport({
|
|
|
|
|
baseUrl: env.api,
|
|
|
|
|
interceptors: [
|
|
|
|
|
NewConnectWebAuthInterceptor(this.authInterceptorProvider),
|
|
|
|
|
NewConnectWebOrgInterceptor(this.orgInterceptorProvider),
|
|
|
|
|
],
|
|
|
|
|
});
|
2025-02-17 19:25:46 +01:00
|
|
|
this.userNew = createUserServiceClient(transport);
|
2025-03-14 07:05:45 +01:00
|
|
|
this.mgmtNew = createManagementServiceClient(transportOldAPIs);
|
2025-02-17 19:25:46 +01:00
|
|
|
this.authNew = createAuthServiceClient(transport);
|
2020-07-08 13:56:37 +02:00
|
|
|
|
2025-02-17 19:25:46 +01:00
|
|
|
const authConfig: AuthConfig = {
|
|
|
|
|
scope: 'openid profile email',
|
|
|
|
|
responseType: 'code',
|
|
|
|
|
oidc: true,
|
|
|
|
|
clientId: env.clientid,
|
|
|
|
|
issuer: env.issuer,
|
|
|
|
|
redirectUri: window.location.origin + this.platformLocation.getBaseHrefFromDOM() + 'auth/callback',
|
|
|
|
|
postLogoutRedirectUri: window.location.origin + this.platformLocation.getBaseHrefFromDOM() + 'signedout',
|
|
|
|
|
requireHttps: false,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.authenticationService.initConfig(authConfig);
|
|
|
|
|
}),
|
|
|
|
|
catchError((err) => {
|
|
|
|
|
console.error('Failed to load environment from assets', err);
|
|
|
|
|
throw err;
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return firstValueFrom(init);
|
feat(console): update deps, alternative hash function with fixed colors, use preferrenLoginName for hashing, fix iam write permissions, user img upload (#1846)
* chore(deps-dev): bump @types/jasmine from 3.6.9 to 3.7.7 in /console (#1824)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.6.9 to 3.7.7.
- [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 google-protobuf from 3.15.8 to 3.17.2 in /console (#1823)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.15.8 to 3.17.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.15.8...v3.17.2)
---
updated-dependencies:
- dependency-name: google-protobuf
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): bump @angular/animations from 12.0.0 to 12.0.3 in /console (#1821)
Bumps [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) from 12.0.0 to 12.0.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.0.3/packages/animations)
---
updated-dependencies:
- dependency-name: "@angular/animations"
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/material from 12.0.0 to 12.0.3 in /console (#1819)
Bumps [@angular/material](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material"
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-dev): bump prettier from 2.2.1 to 2.3.1 in /console (#1818)
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.1)
---
updated-dependencies:
- dependency-name: prettier
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/platform-browser-dynamic in /console (#1817)
Bumps [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) from 12.0.0 to 12.0.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.0.3/packages/platform-browser-dynamic)
---
updated-dependencies:
- dependency-name: "@angular/platform-browser-dynamic"
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-dev): bump @types/node from 14.14.37 to 15.12.1 in /console (#1815)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 15.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/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): bump @angular/common from 12.0.0 to 12.0.3 in /console (#1814)
Bumps [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) from 12.0.0 to 12.0.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.0.3/packages/common)
---
updated-dependencies:
- dependency-name: "@angular/common"
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/material-moment-adapter from 12.0.0 to 12.0.3 in /console (#1816)
* chore(deps): bump @angular/material-moment-adapter in /console
Bumps [@angular/material-moment-adapter](https://github.com/angular/components) from 12.0.0 to 12.0.3.
- [Release notes](https://github.com/angular/components/releases)
- [Changelog](https://github.com/angular/components/blob/12.0.3/CHANGELOG.md)
- [Commits](https://github.com/angular/components/compare/12.0.0...12.0.3)
---
updated-dependencies:
- dependency-name: "@angular/material-moment-adapter"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* sort
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <max@caos.ch>
* chore(deps-dev): bump @angular/language-service in /console (#1822)
Bumps [@angular/language-service](https://github.com/angular/angular/tree/HEAD/packages/language-service) from 12.0.0 to 12.0.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.0.3/packages/language-service)
---
updated-dependencies:
- dependency-name: "@angular/language-service"
dependency-type: direct:development
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>
Co-authored-by: Max Peintner <max@caos.ch>
* image cropper
* fix: avatar bg colors, preferred username, login script
* lint
* membership color
* rem logs
* profile picture component
* pic comp
* dialog tirgger btn
* trigger dialog, styles
* lock
* interceptor for org, upload, remove
* tooltip
* lint
* stylelint
* generate same credentials of username as in login
* deletepic
* fix disable privatelabeling on missing feature, i18n
* lint
* stylelint
* block loading images if no feature
* lint
* optimize feature check
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-11 11:15:04 +02:00
|
|
|
}
|
2020-07-08 13:56:37 +02:00
|
|
|
}
|