diff --git a/console/src/app/modules/contributors/contributors.component.scss b/console/src/app/modules/contributors/contributors.component.scss index 27725d594a..2782272969 100644 --- a/console/src/app/modules/contributors/contributors.component.scss +++ b/console/src/app/modules/contributors/contributors.component.scss @@ -47,9 +47,9 @@ width: 32px; line-height: 1rem; border-radius: 50%; - -webkit-box-shadow: 2px 0 7px -1px rgba(33, 34, 36, 0.5); - -moz-box-shadow: 2px 0 7px -1px rgba(33, 34, 36, 0.5); - box-shadow: 2px 0 7px -1px rgba(33, 34, 36, 0.5); + -webkit-box-shadow: 1px 0 3px -1px rgba(33, 34, 36, 0.5); + -moz-box-shadow: 1px 0 3px -1px rgba(33, 34, 36, 0.5); + box-shadow: 1px 0 3px -1px rgba(33, 34, 36, 0.5); cursor: pointer; display: flex; align-items: center; diff --git a/console/src/app/modules/filter-org/filter-org.component.html b/console/src/app/modules/filter-org/filter-org.component.html index 063aff3bbb..a915672b6b 100644 --- a/console/src/app/modules/filter-org/filter-org.component.html +++ b/console/src/app/modules/filter-org/filter-org.component.html @@ -1,14 +1,18 @@ - +
-
\ No newline at end of file +
diff --git a/console/src/app/modules/filter-org/filter-org.component.ts b/console/src/app/modules/filter-org/filter-org.component.ts index 82a92dc08f..6f42fd7bdf 100644 --- a/console/src/app/modules/filter-org/filter-org.component.ts +++ b/console/src/app/modules/filter-org/filter-org.component.ts @@ -50,7 +50,7 @@ export class FilterOrgComponent extends FilterComponent implements OnInit { }); this.searchQueries = orgQueries.filter((q) => q !== undefined) as OrgQuery[]; - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : undefined); // this.showFilter = true; // this.filterOpen.emit(true); } @@ -88,11 +88,9 @@ export class FilterOrgComponent extends FilterComponent implements OnInit { switch (subquery) { case SubQuery.NAME: (query as OrgNameQuery).setName(value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; } - - this.filterCount$.next(this.filterCount); } public getSubFilter(subquery: SubQuery): any { @@ -109,23 +107,17 @@ export class FilterOrgComponent extends FilterComponent implements OnInit { public setMethod(query: any, event: any) { (query as UserNameQuery).setMethod(event.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); } public emitFilter(): void { - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); this.showFilter = false; this.filterOpen.emit(false); - - this.filterCount$.next(this.filterCount); } public resetFilter(): void { this.searchQueries = []; this.emitFilter(); } - - public get filterCount(): number { - return this.searchQueries.length; - } } diff --git a/console/src/app/modules/filter-project/filter-project.component.html b/console/src/app/modules/filter-project/filter-project.component.html index 940a12b05e..4c0b1975a9 100644 --- a/console/src/app/modules/filter-project/filter-project.component.html +++ b/console/src/app/modules/filter-project/filter-project.component.html @@ -1,31 +1,18 @@ - +
- - -
-
\ No newline at end of file +
diff --git a/console/src/app/modules/filter-project/filter-project.component.ts b/console/src/app/modules/filter-project/filter-project.component.ts index 00f0b0d9f5..c8e9efeae7 100644 --- a/console/src/app/modules/filter-project/filter-project.component.ts +++ b/console/src/app/modules/filter-project/filter-project.component.ts @@ -50,7 +50,7 @@ export class FilterProjectComponent extends FilterComponent implements OnInit { }); this.searchQueries = projectQueries.filter((q) => q !== undefined) as ProjectQuery[]; - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); // this.showFilter = true; // this.filterOpen.emit(true); } @@ -60,15 +60,6 @@ export class FilterProjectComponent extends FilterComponent implements OnInit { public changeCheckbox(subquery: SubQuery, event: MatCheckboxChange) { if (event.checked) { switch (subquery) { - // case SubQuery.RESOURCEOWNER: - // const ronq = new ProjectResourceOwnerQuery(); - // ronq.setResourceOwner(''); - - // const ro_sq = new ProjectQuery(); - // ro_sq.setProjectResourceOwnerQuery(ronq); - - // this.searchQueries.push(ro_sq); - // break; case SubQuery.NAME: const nq = new ProjectNameQuery(); nq.setMethod(TextQueryMethod.TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE); @@ -82,14 +73,6 @@ export class FilterProjectComponent extends FilterComponent implements OnInit { } } else { switch (subquery) { - // case SubQuery.RESOURCEOWNER: - // const index_s = this.searchQueries.findIndex( - // (q) => (q as ProjectQuery).toObject().projectResourceOwnerQuery !== undefined, - // ); - // if (index_s > -1) { - // this.searchQueries.splice(index_s, 1); - // } - // break; case SubQuery.NAME: const index_dn = this.searchQueries.findIndex((q) => (q as ProjectQuery).toObject().nameQuery !== undefined); if (index_dn > -1) { @@ -103,28 +86,15 @@ export class FilterProjectComponent extends FilterComponent implements OnInit { public setValue(subquery: SubQuery, query: any, event: any) { const value = event?.target?.value ?? event.value; switch (subquery) { - // case SubQuery.RESOURCEOWNER: - // (query as ProjectResourceOwnerQuery).setResourceOwner(value); - // this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); - // break; case SubQuery.NAME: (query as ProjectNameQuery).setName(value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; } - - this.filterCount$.next(this.filterCount); } public getSubFilter(subquery: SubQuery): any { switch (subquery) { - // case SubQuery.RESOURCEOWNER: - // const s = this.searchQueries.find((q) => (q as ProjectQuery).toObject().projectResourceOwnerQuery !== undefined); - // if (s) { - // return (s as ProjectQuery).getProjectResourceOwnerQuery(); - // } else { - // return undefined; - // } case SubQuery.NAME: const dn = this.searchQueries.find((q) => (q as ProjectQuery).toObject().nameQuery !== undefined); if (dn) { @@ -137,15 +107,13 @@ export class FilterProjectComponent extends FilterComponent implements OnInit { public setMethod(query: any, event: any) { (query as UserNameQuery).setMethod(event.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); } public emitFilter(): void { - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); this.showFilter = false; this.filterOpen.emit(false); - - this.filterCount$.next(this.filterCount); } public resetFilter(): void { @@ -153,7 +121,7 @@ export class FilterProjectComponent extends FilterComponent implements OnInit { this.emitFilter(); } - public get filterCount(): number { + public get filterCounter(): number { return this.searchQueries.length; } } diff --git a/console/src/app/modules/filter-user-grants/filter-user-grants.component.html b/console/src/app/modules/filter-user-grants/filter-user-grants.component.html index 6eac6086f7..b3cdf40af2 100644 --- a/console/src/app/modules/filter-user-grants/filter-user-grants.component.html +++ b/console/src/app/modules/filter-user-grants/filter-user-grants.component.html @@ -1,4 +1,4 @@ - +
q !== undefined) as UserGrantQuery[]; - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); // this.showFilter = true; // this.filterOpen.emit(true); } @@ -170,23 +170,21 @@ export class FilterUserGrantsComponent extends FilterComponent implements OnInit switch (subquery) { case SubQuery.DISPLAYNAME: (query as DisplayNameQuery).setDisplayName(event?.target?.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; case SubQuery.USERNAME: (query as UserNameQuery).setUserName(event?.target?.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; case SubQuery.ORGNAME: (query as UserGrantOrgNameQuery).setOrgName(event?.target?.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; case SubQuery.PROJECTNAME: (query as UserGrantProjectNameQuery).setProjectName(event?.target?.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; } - - this.filterCount$.next(this.filterCount); } public getSubFilter(subquery: SubQuery): any { @@ -225,23 +223,17 @@ export class FilterUserGrantsComponent extends FilterComponent implements OnInit public setMethod(query: any, event: any) { (query as UserNameQuery).setMethod(event.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); } public emitFilter(): void { - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); this.showFilter = false; this.filterOpen.emit(false); - - this.filterCount$.next(this.filterCount); } public resetFilter(): void { this.searchQueries = []; this.emitFilter(); } - - public get filterCount(): number { - return this.searchQueries.length; - } } diff --git a/console/src/app/modules/filter-user/filter-user.component.html b/console/src/app/modules/filter-user/filter-user.component.html index df312c53e0..2f85e5af94 100644 --- a/console/src/app/modules/filter-user/filter-user.component.html +++ b/console/src/app/modules/filter-user/filter-user.component.html @@ -1,8 +1,12 @@ - +
- {{'FILTER.STATE' | translate}} + {{ 'FILTER.STATE' | translate }}
@@ -10,9 +14,9 @@ - + - {{ 'USER.STATE.'+state | translate }} + {{ 'USER.STATE.' + state | translate }} @@ -20,63 +24,77 @@
- {{'FILTER.DISPLAYNAME' | translate}} + {{ 'FILTER.DISPLAYNAME' | translate }}
- {{ 'FILTER.METHODS.'+method | translate }} + {{ 'FILTER.METHODS.' + method | translate }} - +
- {{'FILTER.USERNAME' | translate}} + {{ 'FILTER.USERNAME' | translate }}
- {{ 'FILTER.METHODS.'+method | translate}} + {{ 'FILTER.METHODS.' + method | translate }} - +
- \ No newline at end of file + diff --git a/console/src/app/modules/filter-user/filter-user.component.ts b/console/src/app/modules/filter-user/filter-user.component.ts index d2e8beaa8d..0fd3ca9482 100644 --- a/console/src/app/modules/filter-user/filter-user.component.ts +++ b/console/src/app/modules/filter-user/filter-user.component.ts @@ -91,7 +91,7 @@ export class FilterUserComponent extends FilterComponent implements OnInit { }); this.searchQueries = userQueries.filter((q) => q !== undefined) as UserSearchQuery[]; - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); // this.showFilter = true; // this.filterOpen.emit(true); } @@ -181,23 +181,21 @@ export class FilterUserComponent extends FilterComponent implements OnInit { switch (subquery) { case SubQuery.STATE: (query as StateQuery).setState(value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; case SubQuery.DISPLAYNAME: (query as DisplayNameQuery).setDisplayName(value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; case SubQuery.EMAIL: (query as EmailQuery).setEmailAddress(value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; case SubQuery.USERNAME: (query as UserNameQuery).setUserName(value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); break; } - - this.filterCount$.next(this.filterCount); } public getSubFilter(subquery: SubQuery): any { @@ -235,23 +233,17 @@ export class FilterUserComponent extends FilterComponent implements OnInit { public setMethod(query: any, event: any) { (query as UserNameQuery).setMethod(event.value); - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); } public emitFilter(): void { - this.filterChanged.emit(this.filterCount ? this.searchQueries : undefined); + this.filterChanged.emit(this.searchQueries ? this.searchQueries : []); this.showFilter = false; this.filterOpen.emit(false); - - this.filterCount$.next(this.filterCount); } public resetFilter(): void { this.searchQueries = []; this.emitFilter(); } - - public get filterCount(): number { - return this.searchQueries.length; - } } diff --git a/console/src/app/modules/filter/filter.component.html b/console/src/app/modules/filter/filter.component.html index dafc6acd16..99e3adcf90 100644 --- a/console/src/app/modules/filter/filter.component.html +++ b/console/src/app/modules/filter/filter.component.html @@ -1,25 +1,37 @@
- - +
- - {{'FILTER.TITLE' | translate}} - + + {{ 'FILTER.TITLE' | translate }} +
-
\ No newline at end of file +
diff --git a/console/src/app/modules/filter/filter.component.ts b/console/src/app/modules/filter/filter.component.ts index 8f83747279..1c503acd8f 100644 --- a/console/src/app/modules/filter/filter.component.ts +++ b/console/src/app/modules/filter/filter.component.ts @@ -1,7 +1,7 @@ import { ConnectedPosition, ConnectionPositionPair } from '@angular/cdk/overlay'; -import { Component, EventEmitter, OnDestroy, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnDestroy, Output } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { BehaviorSubject, Subject, takeUntil } from 'rxjs'; +import { Observable, Subject, takeUntil } from 'rxjs'; import { SearchQuery as MemberSearchQuery } from 'src/app/proto/generated/zitadel/member_pb'; import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb'; import { OrgQuery } from 'src/app/proto/generated/zitadel/org_pb'; @@ -24,15 +24,16 @@ type FilterSearchQueryAsObject = styleUrls: ['./filter.component.scss'], }) export class FilterComponent implements OnDestroy { - @Output() public filterChanged: EventEmitter = new EventEmitter(); + @Output() public filterChanged: EventEmitter = new EventEmitter(); @Output() public filterOpen: EventEmitter = new EventEmitter(false); @Output() public resetted: EventEmitter = new EventEmitter(); @Output() public trigger: EventEmitter = new EventEmitter(); - private destroy$: Subject = new Subject(); + @Input() public queryCount: number = 0; - public filterCount$: BehaviorSubject = new BehaviorSubject(0); + private destroy$: Subject = new Subject(); + public filterChanged$: Observable = this.filterChanged.asObservable(); public showFilter: boolean = false; public methods: TextQueryMethod[] = [ @@ -59,7 +60,6 @@ export class FilterComponent implements OnDestroy { } public ngOnDestroy(): void { - this.filterCount$.complete(); this.destroy$.next(); this.destroy$.complete(); } @@ -83,6 +83,7 @@ export class FilterComponent implements OnDestroy { queryParams: { ['filter']: JSON.stringify(filters), }, + replaceUrl: true, queryParamsHandling: 'merge', skipLocationChange: false, }); diff --git a/console/src/app/modules/header/header.component.ts b/console/src/app/modules/header/header.component.ts index fa627b914a..a5e5298935 100644 --- a/console/src/app/modules/header/header.component.ts +++ b/console/src/app/modules/header/header.component.ts @@ -68,9 +68,16 @@ export class HeaderComponent implements OnDestroy { } public get isOnInstance(): boolean { - return ( - ['/instance', '/views', '/orgs', '/settings', '/failed-events', '/instance/members'].includes(this.router.url) || - this.router.url.includes('/settings') - ); + const pages: string[] = [ + '/instance', + '/settings', + '/views', + '/orgs', + '/settings', + '/failed-events', + '/instance/members', + ]; + + return pages.findIndex((p) => this.router.url.includes(p)) > -1; } } diff --git a/console/src/app/modules/members-table/members-table.component.html b/console/src/app/modules/members-table/members-table.component.html index 9afb130e0e..c2d84b87f6 100644 --- a/console/src/app/modules/members-table/members-table.component.html +++ b/console/src/app/modules/members-table/members-table.component.html @@ -1,6 +1,11 @@ - - + @@ -13,17 +18,32 @@ + + {{ member.userId }} + - + + {{ member.displayName }} + - + + {{ member.preferredLoginName }} + - + @@ -63,24 +86,36 @@ - + - - +
- + [indeterminate]="selection.hasValue() && !isAllSelected()" + > - - + + @@ -35,27 +55,30 @@ - {{ 'PROJECT.MEMBER.USERID' | translate }} {{ 'PROJECT.MEMBER.USERID' | translate }} - {{member.userId}} {{ 'PROJECT.MEMBER.DISPLAYNAME' | translate }} {{ 'PROJECT.MEMBER.DISPLAYNAME' | translate }} - {{member.displayName}} {{ 'PROJECT.MEMBER.LOGINNAME' | translate }} {{ 'PROJECT.MEMBER.LOGINNAME' | translate }} - {{member.preferredLoginName}} {{ 'PROJECT.MEMBER.EMAIL' | translate }} {{ 'PROJECT.MEMBER.EMAIL' | translate }} - {{member.email}} + {{ member.email }} - + {{ 'ROLESLABEL' | translate }} {{ 'ROLESLABEL' | translate }} - +
- {{role | roletransform}} + {{ role | roletransform }} @@ -90,13 +125,23 @@
- + - \ No newline at end of file + diff --git a/console/src/app/modules/org-table/org-table.component.html b/console/src/app/modules/org-table/org-table.component.html index 113414f16b..dbfc1f67c5 100644 --- a/console/src/app/modules/org-table/org-table.component.html +++ b/console/src/app/modules/org-table/org-table.component.html @@ -15,7 +15,14 @@ - +
diff --git a/console/src/app/modules/org-table/org-table.component.ts b/console/src/app/modules/org-table/org-table.component.ts index f0ea8becde..4129cfa043 100644 --- a/console/src/app/modules/org-table/org-table.component.ts +++ b/console/src/app/modules/org-table/org-table.component.ts @@ -1,9 +1,11 @@ +import { LiveAnnouncer } from '@angular/cdk/a11y'; import { Component, Input, ViewChild } from '@angular/core'; +import { MatSort, Sort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { Router } from '@angular/router'; import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; import { BehaviorSubject, catchError, finalize, from, map, Observable, of, Subject, switchMap, takeUntil } from 'rxjs'; -import { Org, OrgQuery, OrgState } from 'src/app/proto/generated/zitadel/org_pb'; +import { Org, OrgFieldName, OrgQuery, OrgState } from 'src/app/proto/generated/zitadel/org_pb'; import { GrpcAuthService } from 'src/app/services/grpc-auth.service'; import { ToastService } from 'src/app/services/toast.service'; @@ -38,6 +40,7 @@ export class OrgTableComponent { public filterOpen: boolean = false; public OrgState: any = OrgState; public copied: string = ''; + @ViewChild(MatSort) public sort!: MatSort; private searchQueries: OrgQuery[] = []; private destroy$: Subject = new Subject(); @@ -48,7 +51,12 @@ export class OrgTableComponent { }); private requestOrgsObservable$ = this.requestOrgs$.pipe(takeUntil(this.destroy$)); - constructor(private authService: GrpcAuthService, private router: Router, private toast: ToastService) { + constructor( + private authService: GrpcAuthService, + private router: Router, + private toast: ToastService, + private _liveAnnouncer: LiveAnnouncer, + ) { this.requestOrgs$.next({ limit: this.initialLimit, offset: 0, queries: this.searchQueries }); this.authService.getActiveOrg().then((org) => (this.activeOrg = org)); @@ -60,7 +68,17 @@ export class OrgTableComponent { public loadOrgs(request: Request): Observable { this.loadingSubject.next(true); - return from(this.authService.listMyProjectOrgs(request.limit, request.offset, request.queries)).pipe( + let sortingField: OrgFieldName | undefined = undefined; + if (this.sort?.active && this.sort?.direction) + switch (this.sort.active) { + case 'name': + sortingField = OrgFieldName.ORG_FIELD_NAME_NAME; + break; + } + + return from( + this.authService.listMyProjectOrgs(request.limit, request.offset, request.queries, sortingField, this.sort?.direction), + ).pipe( map((resp) => { this.timestamp = resp.details?.viewTimestamp; this.totalResult = resp.details?.totalResult ?? 0; @@ -86,6 +104,15 @@ export class OrgTableComponent { }); } + public sortChange(sortState: Sort) { + if (sortState.direction && sortState.active) { + this._liveAnnouncer.announce(`Sorted ${sortState.direction}ending`); + this.refresh(); + } else { + this._liveAnnouncer.announce('Sorting cleared'); + } + } + public applySearchQuery(searchQueries: OrgQuery[]): void { this.searchQueries = searchQueries; this.requestOrgs$.next({ diff --git a/console/src/app/modules/policies/domain-policy/domain-policy.component.html b/console/src/app/modules/policies/domain-policy/domain-policy.component.html new file mode 100644 index 0000000000..14256905bd --- /dev/null +++ b/console/src/app/modules/policies/domain-policy/domain-policy.component.html @@ -0,0 +1,52 @@ +
+ +
+ +

{{ 'POLICY.DOMAIN_POLICY.TITLE' | translate }}

+ {{ 'POLICY.DEFAULTLABEL' | translate }} + + + + + + +
+
+ + {{ 'POLICY.DATA.USERLOGINMUSTBEDOMAIN' | translate }} + +
+ + +
+ + {{ 'POLICY.DATA.VALIDATEORGDOMAINS' | translate }} + +
+ +
+ + {{ 'POLICY.DATA.SMTPSENDERADDRESSMATCHESINSTANCEDOMAIN' | translate }} + +
+
+ + +
+ +
diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.scss b/console/src/app/modules/policies/domain-policy/domain-policy.component.scss similarity index 100% rename from console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.scss rename to console/src/app/modules/policies/domain-policy/domain-policy.component.scss diff --git a/console/src/app/modules/policies/domain-policy/domain-policy.component.spec.ts b/console/src/app/modules/policies/domain-policy/domain-policy.component.spec.ts new file mode 100644 index 0000000000..5a732c791e --- /dev/null +++ b/console/src/app/modules/policies/domain-policy/domain-policy.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { DomainPolicyComponent } from './domain-policy.component'; + +describe('DomainPolicyComponent', () => { + let component: DomainPolicyComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [DomainPolicyComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DomainPolicyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts b/console/src/app/modules/policies/domain-policy/domain-policy.component.ts similarity index 50% rename from console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts rename to console/src/app/modules/policies/domain-policy/domain-policy.component.ts index 17126272a9..bf72bd1581 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts +++ b/console/src/app/modules/policies/domain-policy/domain-policy.component.ts @@ -1,32 +1,43 @@ import { Component, Injector, Input, OnDestroy, OnInit, Type } from '@angular/core'; import { Subscription } from 'rxjs'; -import { GetCustomOrgIAMPolicyResponse } from 'src/app/proto/generated/zitadel/admin_pb'; +import { + AddCustomDomainPolicyRequest, + GetCustomOrgIAMPolicyResponse, + UpdateDomainPolicyRequest, +} from 'src/app/proto/generated/zitadel/admin_pb'; import { GetOrgIAMPolicyResponse } from 'src/app/proto/generated/zitadel/management_pb'; import { Org } from 'src/app/proto/generated/zitadel/org_pb'; -import { OrgIAMPolicy } from 'src/app/proto/generated/zitadel/policy_pb'; +import { DomainPolicy, OrgIAMPolicy } from 'src/app/proto/generated/zitadel/policy_pb'; import { AdminService } from 'src/app/services/admin.service'; import { ManagementService } from 'src/app/services/mgmt.service'; +import { StorageLocation, StorageService } from 'src/app/services/storage.service'; import { ToastService } from 'src/app/services/toast.service'; import { PolicyComponentServiceType } from '../policy-component-types.enum'; @Component({ - selector: 'cnsl-org-iam-policy', - templateUrl: './org-iam-policy.component.html', - styleUrls: ['./org-iam-policy.component.scss'], + selector: 'cnsl-domain-policy', + templateUrl: './domain-policy.component.html', + styleUrls: ['./domain-policy.component.scss'], }) -export class OrgIamPolicyComponent implements OnInit, OnDestroy { +export class DomainPolicyComponent implements OnInit, OnDestroy { private managementService!: ManagementService; @Input() public serviceType!: PolicyComponentServiceType; - public iamData!: OrgIAMPolicy.AsObject; + public domainData!: DomainPolicy.AsObject; + public loading: boolean = false; private sub: Subscription = new Subscription(); private org!: Org.AsObject; public PolicyComponentServiceType: any = PolicyComponentServiceType; - constructor(private toast: ToastService, private injector: Injector, private adminService: AdminService) {} + constructor( + private toast: ToastService, + private injector: Injector, + private adminService: AdminService, + private storageService: StorageService, + ) {} ngOnInit(): void { if (this.serviceType === PolicyComponentServiceType.MGMT) { @@ -40,22 +51,32 @@ export class OrgIamPolicyComponent implements OnInit, OnDestroy { } public fetchData(): void { - this.getData().then((resp) => { - if (resp?.policy) { - this.iamData = resp.policy; - } - }); + this.loading = true; + this.getData() + .then((resp) => { + this.loading = false; + if (resp?.policy) { + this.domainData = resp.policy; + } + }) + .catch((error) => { + this.loading = false; + this.toast.showError(error); + }); } private async getData(): Promise { + const org: Org.AsObject | null = this.storageService.getItem('organization', StorageLocation.session); + + if (org?.id) { + this.org = org; + } + switch (this.serviceType) { case PolicyComponentServiceType.MGMT: - return this.managementService.getOrgIAMPolicy(); + return this.managementService.getDomainPolicy(); case PolicyComponentServiceType.ADMIN: - if (this.org?.id) { - return this.adminService.getCustomOrgIAMPolicy(this.org.id); - } - break; + return this.adminService.getCustomDomainPolicy(this.org.id); default: return Promise.reject(); } @@ -64,23 +85,33 @@ export class OrgIamPolicyComponent implements OnInit, OnDestroy { public savePolicy(): void { switch (this.serviceType) { case PolicyComponentServiceType.MGMT: - if ((this.iamData as OrgIAMPolicy.AsObject).isDefault) { + if ((this.domainData as OrgIAMPolicy.AsObject).isDefault) { + const req = new AddCustomDomainPolicyRequest(); + req.setOrgId(this.org.id); + req.setUserLoginMustBeDomain(this.domainData.userLoginMustBeDomain); + req.setValidateOrgDomains(this.domainData.validateOrgDomains); + req.setSmtpSenderAddressMatchesInstanceDomain(this.domainData.smtpSenderAddressMatchesInstanceDomain); + this.adminService - .addCustomOrgIAMPolicy(this.org.id, this.iamData.userLoginMustBeDomain) + .addCustomDomainPolicy(req) .then(() => { this.toast.showInfo('POLICY.TOAST.SET', true); - this.fetchData(); }) .catch((error) => { this.toast.showError(error); }); break; } else { + const req = new AddCustomDomainPolicyRequest(); + req.setOrgId(this.org.id); + req.setUserLoginMustBeDomain(this.domainData.userLoginMustBeDomain); + req.setValidateOrgDomains(this.domainData.validateOrgDomains); + req.setSmtpSenderAddressMatchesInstanceDomain(this.domainData.smtpSenderAddressMatchesInstanceDomain); + this.adminService - .updateCustomOrgIAMPolicy(this.org.id, this.iamData.userLoginMustBeDomain) + .updateCustomDomainPolicy(req) .then(() => { this.toast.showInfo('POLICY.TOAST.SET', true); - this.fetchData(); }) .catch((error) => { this.toast.showError(error); @@ -88,12 +119,15 @@ export class OrgIamPolicyComponent implements OnInit, OnDestroy { break; } case PolicyComponentServiceType.ADMIN: - // update Default org iam policy? + const req = new UpdateDomainPolicyRequest(); + req.setUserLoginMustBeDomain(this.domainData.userLoginMustBeDomain); + req.setValidateOrgDomains(this.domainData.validateOrgDomains); + req.setSmtpSenderAddressMatchesInstanceDomain(this.domainData.smtpSenderAddressMatchesInstanceDomain); + this.adminService - .updateOrgIAMPolicy(this.iamData.userLoginMustBeDomain) + .updateDomainPolicy(req) .then(() => { this.toast.showInfo('POLICY.TOAST.SET', true); - this.fetchData(); }) .catch((error) => { this.toast.showError(error); @@ -105,7 +139,7 @@ export class OrgIamPolicyComponent implements OnInit, OnDestroy { public removePolicy(): void { if (this.serviceType === PolicyComponentServiceType.MGMT) { this.adminService - .resetCustomOrgIAMPolicyToDefault(this.org.id) + .resetCustomDomainPolicyToDefault(this.org.id) .then(() => { this.toast.showInfo('POLICY.TOAST.RESETSUCCESS', true); setTimeout(() => { @@ -119,8 +153,8 @@ export class OrgIamPolicyComponent implements OnInit, OnDestroy { } public get isDefault(): boolean { - if (this.iamData && this.serviceType === PolicyComponentServiceType.MGMT) { - return (this.iamData as OrgIAMPolicy.AsObject).isDefault; + if (this.domainData && this.serviceType === PolicyComponentServiceType.MGMT) { + return (this.domainData as OrgIAMPolicy.AsObject).isDefault; } else { return false; } diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.module.ts b/console/src/app/modules/policies/domain-policy/domain-policy.module.ts similarity index 73% rename from console/src/app/modules/policies/org-iam-policy/org-iam-policy.module.ts rename to console/src/app/modules/policies/domain-policy/domain-policy.module.ts index 8c91d070d9..b41e49f7ab 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.module.ts +++ b/console/src/app/modules/policies/domain-policy/domain-policy.module.ts @@ -2,8 +2,9 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatIconModule } from '@angular/material/icon'; -import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatTooltipModule } from '@angular/material/tooltip'; import { TranslateModule } from '@ngx-translate/core'; import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; @@ -13,27 +14,26 @@ import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.mod import { CardModule } from '../../card/card.module'; import { InfoSectionModule } from '../../info-section/info-section.module'; -import { OrgIamPolicyRoutingModule } from './org-iam-policy-routing.module'; -import { OrgIamPolicyComponent } from './org-iam-policy.component'; +import { DomainPolicyComponent } from './domain-policy.component'; @NgModule({ - declarations: [OrgIamPolicyComponent], + declarations: [DomainPolicyComponent], imports: [ - OrgIamPolicyRoutingModule, CommonModule, FormsModule, CardModule, InputModule, MatButtonModule, HasRolePipeModule, - MatSlideToggleModule, MatIconModule, HasRoleModule, + MatProgressSpinnerModule, MatTooltipModule, InfoSectionModule, + MatCheckboxModule, TranslateModule, DetailLayoutModule, ], - exports: [OrgIamPolicyComponent], + exports: [DomainPolicyComponent], }) -export class OrgIamPolicyModule {} +export class DomainPolicyModule {} diff --git a/console/src/app/modules/policies/login-policy/login-policy.component.html b/console/src/app/modules/policies/login-policy/login-policy.component.html index 923342d24c..2e52e020e2 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.component.html +++ b/console/src/app/modules/policies/login-policy/login-policy.component.html @@ -45,15 +45,9 @@

{{ 'MFA.LIST.SECONDFACTORDESCRIPTION' | translate }}

+

{{ 'POLICY.LOGIN_POLICY.LIFETIMEDURATIONS' | translate }}

+ +
+ + {{ 'POLICY.DATA.PASSWORDCHECKLIFETIME' | translate }} ({{ 'POLICY.DATA.INHOURS' | translate }}) + + + + + {{ 'POLICY.DATA.EXTERNALLOGINCHECKLIFETIME' | translate }} ({{ 'POLICY.DATA.INHOURS' | translate }}) + + + + + {{ 'POLICY.DATA.MFAINITSKIPLIFETIME' | translate }} ({{ 'POLICY.DATA.INHOURS' | translate }}) + + + + + {{ 'POLICY.DATA.SECONDFACTORCHECKLIFETIME' | translate }}  + ({{ 'POLICY.DATA.INHOURS' | translate }}) + + + + + {{ 'POLICY.DATA.MULTIFACTORCHECKLIFETIME' | translate }}  + ({{ 'POLICY.DATA.INHOURS' | translate }}) + + + + +
+

{{ 'POLICY.LOGIN_POLICY.ADVANCED' | translate }}

-
{{ 'ORG.PAGES.ACTIVE' | translate }} @@ -51,6 +58,7 @@ + {{ 'ORG.PAGES.NAME' | translate }}
- + - + + {{ grant.orgName }} + - + + {{ grant.projectName }} + - + - + - + @@ -103,42 +149,56 @@ - + - - - +
- + [indeterminate]="selection.hasValue() && !isAllSelected()" + > - + [disabled]=" + disableWrite || + !( + (['user.grant.write$'] | hasRole | async) || + ((context === UserGrantContext.OWNED_PROJECT + ? ['user.grant.write:' + row?.projectId] + : context === UserGrantContext.GRANTED_PROJECT + ? ['user.grant.write:' + row?.id] + : [] + ) + | hasRole + | async) + ) + " + color="primary" + (click)="$event.stopPropagation()" + (change)="$event ? selection.toggle(row) : null" + [checked]="selection.isSelected(row)" + > + - - + {{ 'PROJECT.GRANT.USER' | translate }} {{ 'PROJECT.GRANT.USER' | translate }} - {{grant.displayName ? grant.displayName : - grant.userName ? grant.userName : ''}} + {{ grant.displayName ? grant.displayName : grant.userName ? grant.userName : '' }} {{ 'PROJECT.GRANT.ORG' | translate }} {{ 'PROJECT.GRANT.ORG' | translate }} - {{grant.orgName}} {{ 'PROJECT.GRANT.PROJECTNAME' | translate }} {{ 'PROJECT.GRANT.PROJECTNAME' | translate }} - {{grant.projectName}} {{ 'PROJECT.GRANT.TYPE' | translate }} {{ 'PROJECT.GRANT.TYPE' | translate }} - {{getType(grant)}} + {{ getType(grant) }} {{'PROJECT.GRANT.CREATIONDATE' | translate}} {{ 'PROJECT.GRANT.CREATIONDATE' | translate }} - {{grant.details.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' - }} + {{ grant.details.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }} {{ 'PROJECT.GRANT.CHANGEDATE' | translate }} {{ 'PROJECT.GRANT.CHANGEDATE' | translate }} - {{grant.details.changeDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' - }} + {{ grant.details.changeDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }}
- {{ role }} + {{ role }}
-
- {{'GRANTS.EMPTY' | translate}} + {{ 'GRANTS.EMPTY' | translate }}
- + - - \ No newline at end of file + diff --git a/console/src/app/modules/user-grants/user-grants.component.ts b/console/src/app/modules/user-grants/user-grants.component.ts index ef35d8bdbd..ced1ee90d0 100644 --- a/console/src/app/modules/user-grants/user-grants.component.ts +++ b/console/src/app/modules/user-grants/user-grants.component.ts @@ -200,7 +200,9 @@ export class UserGrantsComponent implements OnInit, AfterViewInit { }); } - public deleteGrant(grant: UserGrant.AsObject): void { + public deleteGrant(event: any, grant: UserGrant.AsObject): void { + event.stopPropagation(); + const dialogRef = this.dialog.open(WarnDialogComponent, { data: { confirmKey: 'ACTIONS.DELETE', diff --git a/console/src/app/pages/instance-settings/instance-settings.component.ts b/console/src/app/pages/instance-settings/instance-settings.component.ts index b35ca912bb..d8578061e0 100644 --- a/console/src/app/pages/instance-settings/instance-settings.component.ts +++ b/console/src/app/pages/instance-settings/instance-settings.component.ts @@ -8,6 +8,7 @@ import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/ import { BRANDING, COMPLEXITY, + DOMAIN, GENERAL, IDP, LOCKOUT, @@ -31,12 +32,14 @@ export class InstanceSettingsComponent { public settingsList: SidenavSetting[] = [ GENERAL, // notifications - { showWarn: true, ...NOTIFICATIONS }, + // { showWarn: true, ...NOTIFICATIONS }, + NOTIFICATIONS, // login LOGIN, COMPLEXITY, LOCKOUT, IDP, + DOMAIN, // appearance BRANDING, MESSAGETEXTS, diff --git a/console/src/app/pages/org-settings/org-settings.component.ts b/console/src/app/pages/org-settings/org-settings.component.ts index 4e5a54f874..f666b313eb 100644 --- a/console/src/app/pages/org-settings/org-settings.component.ts +++ b/console/src/app/pages/org-settings/org-settings.component.ts @@ -8,6 +8,7 @@ import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/ import { BRANDING, COMPLEXITY, + DOMAIN, IDP, LOCKOUT, LOGIN, @@ -29,6 +30,7 @@ export class OrgSettingsComponent { COMPLEXITY, LOCKOUT, IDP, + DOMAIN, BRANDING, MESSAGETEXTS, LOGINTEXTS, diff --git a/console/src/app/pages/projects/apps/app-create/app-create.component.html b/console/src/app/pages/projects/apps/app-create/app-create.component.html index 7e5733e082..1c367ee4e4 100644 --- a/console/src/app/pages/projects/apps/app-create/app-create.component.html +++ b/console/src/app/pages/projects/apps/app-create/app-create.component.html @@ -1,275 +1,349 @@ -
-
- - {{ 'APP.PAGES.CREATE_OIDC' | translate }} -
+
+
+
+ + {{ 'APP.PAGES.CREATE_OIDC' | translate }}Step {{ currentCreateStep }} of {{ createSteps }} +
-

{{'APP.PAGES.CREATE_OIDC_DESC_TITLE' | translate}}

-

{{'APP.PAGES.CREATE_OIDC_DESC_SUB' | translate}}

+
+

{{ 'APP.PAGES.CREATE_OIDC_DESC_TITLE' | translate }}

+ - + + {{ 'APP.OIDC.PROSWITCH' | translate }} + - - {{'APP.OIDC.PROSWITCH' | translate}} - + + +
+ {{ 'APP.OIDC.NAMEANDTYPESECTION' | translate }} - - - - {{'APP.OIDC.NAMEANDTYPESECTION' | translate}} +

{{ 'APP.OIDC.TITLEFIRST' | translate }}

+ + {{ 'APP.NAME' | translate }} + + {{ 'PROJECT.APP.NAMEREQUIRED' | translate }} + -

{{'APP.OIDC.TITLEFIRST' | translate}}

- - {{ 'APP.NAME' | translate }} - - {{'PROJECT.APP.NAMEREQUIRED' | translate}} - +

{{ 'APP.OIDC.TYPETITLE' | translate }}

-

{{'APP.OIDC.TYPETITLE' | translate}}

+ + +
+ +
+ +
- - -
- - -
- -
+ + +
+ {{ 'APP.AUTHMETHODSECTION' | translate }} - - - - {{'APP.AUTHMETHODSECTION' | translate}} + + - - +
+ + +
+ +
-
- - - -
- -
+ + + {{ 'APP.OIDC.REDIRECTSECTION' | translate }} - - - {{'APP.OIDC.REDIRECTSECTION' | translate}} +

{{ 'APP.OIDC.REDIRECTTITLE' | translate }}

+

+ {{ 'APP.OIDC.REDIRECTDESCRIPTIONNATIVE' | translate }} +

+

+ {{ 'APP.OIDC.REDIRECTDESCRIPTIONWEB' | translate }} +

-

{{'APP.OIDC.REDIRECTTITLE' | translate}}

-

- {{'APP.OIDC.REDIRECTDESCRIPTIONNATIVE' | translate}}

-

- {{'APP.OIDC.REDIRECTDESCRIPTIONWEB' | translate}}

- - - - -

{{'APP.OIDC.POSTREDIRECTTITLE' | translate}}

-

- {{'APP.OIDC.REDIRECTDESCRIPTIONNATIVE' | translate}}

-

- {{'APP.OIDC.REDIRECTDESCRIPTIONWEB' | translate}}

- - - - -
- - - -
-
- - - - {{'APP.OIDC.OVERVIEWSECTION'| translate}} -

{{'APP.OIDC.OVERVIEWTITLE' | translate}}

-
- - {{ 'APP.NAME' | translate }} - - - {{oidcAppRequest.name}} - -
- - -
- - {{ 'APP.TYPE' | translate }} - - - {{'APP.OIDC.APPTYPE.'+oidcAppRequest.appType | translate}} - -
-
- - {{ 'APP.GRANT' | translate }} - - - [ - {{'APP.OIDC.GRANT.'+element | translate}} - {{i < oidcAppRequest.grantTypesList.length - 1 ? ', ' : '' }} ] - -
-
- - {{ 'APP.OIDC.RESPONSETYPE' | translate }} - - - [ - {{('APP.OIDC.RESPONSE.'+element | translate)}} - {{i < oidcAppRequest.responseTypesList.length - 1 ? ', ' : '' }} ] - -
- -
- - {{ 'APP.AUTHMETHOD' | translate }} - - - - {{'APP.OIDC.AUTHMETHOD.'+oidcAppRequest?.authMethodType | translate}} - - -
- -
- - {{ 'APP.OIDC.REDIRECT' | translate }} - - - [ - {{redirect}} - {{i < oidcAppRequest.redirectUrisList.length - 1 ? ', ' : '' }} ] - -
- -
- - {{ 'APP.OIDC.POSTLOGOUTREDIRECT' | translate }} - - - [ - {{redirect}} - {{i < oidcAppRequest.postLogoutRedirectUrisList.length - 1 ? ', ' : '' }} ] - -
-
- - -
- - {{ 'APP.AUTHMETHOD' | translate }} - - - - {{'APP.API.AUTHMETHOD.'+apiAppRequest?.authMethodType | translate}} - - -
-
- -
- - - -
-
-
- -
-
-
- - {{ 'APP.NAME' | translate }} - - - - - {{ 'APP.TYPE' | translate }} - - - {{ appType.titleI18nKey | translate }} - - - - - - - {{ 'APP.OIDC.GRANTTYPE' | translate }} - - - {{ ('APP.OIDC.GRANT.' + grant.type) | translate }} - - - - - - {{ 'APP.OIDC.RESPONSETYPE' | translate }} - - - {{ 'APP.OIDC.RESPONSE.'+type.type | translate }} - - - - - - - {{ 'APP.AUTHMETHOD' | translate }} - - - {{ 'APP.OIDC.AUTHMETHOD.'+type.type | translate }} - {{ 'APP.API.AUTHMETHOD.'+type.type | translate }} - - - -
- -
-
- + - {{ 'APP.OIDC.POSTREDIRECTTITLE' | translate }}

+

+ {{ 'APP.OIDC.REDIRECTDESCRIPTIONNATIVE' | translate }} +

+

+ {{ 'APP.OIDC.REDIRECTDESCRIPTIONWEB' | translate }} +

+ + + title="{{ 'APP.OIDC.POSTLOGOUTREDIRECT' | translate }}" + [getValues]="requestRedirectValuesSubject$" + [isNative]="oidcAppRequest.appType === OIDCAppType.OIDC_APP_TYPE_NATIVE" + > -
-
- -
+
+ + +
+ + + + {{ 'APP.OIDC.OVERVIEWSECTION' | translate }} +

{{ 'APP.OIDC.OVERVIEWTITLE' | translate }}

+
+ + {{ 'APP.NAME' | translate }} + + + {{ oidcAppRequest.name }} + +
+ + +
+ + {{ 'APP.TYPE' | translate }} + + + {{ 'APP.OIDC.APPTYPE.' + oidcAppRequest.appType | translate }} + +
+
+ + {{ 'APP.GRANT' | translate }} + + + [ + {{ 'APP.OIDC.GRANT.' + element | translate }} + {{ i < oidcAppRequest.grantTypesList.length - 1 ? ', ' : '' }} ] + +
+
+ + {{ 'APP.OIDC.RESPONSETYPE' | translate }} + + + [ + {{ 'APP.OIDC.RESPONSE.' + element | translate }} + {{ i < oidcAppRequest.responseTypesList.length - 1 ? ', ' : '' }} ] + +
+ +
+ + {{ 'APP.AUTHMETHOD' | translate }} + + + + {{ 'APP.OIDC.AUTHMETHOD.' + oidcAppRequest?.authMethodType | translate }} + + +
+ +
+ + {{ 'APP.OIDC.REDIRECT' | translate }} + + + [ + {{ redirect }} + {{ i < oidcAppRequest.redirectUrisList.length - 1 ? ', ' : '' }} ] + +
+ +
+ + {{ 'APP.OIDC.POSTLOGOUTREDIRECT' | translate }} + + + [ + {{ redirect }} + {{ i < oidcAppRequest.postLogoutRedirectUrisList.length - 1 ? ', ' : '' }} ] + +
+
+ + +
+ + {{ 'APP.AUTHMETHOD' | translate }} + + + + {{ 'APP.API.AUTHMETHOD.' + apiAppRequest?.authMethodType | translate }} + + +
+
+ +
+ + +
+
+ + +
+
+
+ + {{ 'APP.NAME' | translate }} + + + + + {{ 'APP.TYPE' | translate }} + + + {{ appType.titleI18nKey | translate }} + + + + + + + {{ 'APP.OIDC.GRANTTYPE' | translate }} + + + {{ 'APP.OIDC.GRANT.' + grant.type | translate }} + + + + + + {{ 'APP.OIDC.RESPONSETYPE' | translate }} + + + {{ 'APP.OIDC.RESPONSE.' + type.type | translate }} + + + + + + + {{ 'APP.AUTHMETHOD' | translate }} + + + {{ 'APP.OIDC.AUTHMETHOD.' + type.type | translate }} + {{ 'APP.API.AUTHMETHOD.' + type.type | translate }} + + + +
+ +
+
+ + + + + +
+
+ + +
+
+
-
\ No newline at end of file +
diff --git a/console/src/app/pages/projects/apps/app-create/app-create.component.scss b/console/src/app/pages/projects/apps/app-create/app-create.component.scss index e960d4a991..07a7a1ec56 100644 --- a/console/src/app/pages/projects/apps/app-create/app-create.component.scss +++ b/console/src/app/pages/projects/apps/app-create/app-create.component.scss @@ -12,109 +12,122 @@ p.desc { display: block; } -.app-create-container { - padding-top: 2rem; +.abort-container { + display: flex; + align-items: center; + margin-bottom: 2rem; - .progress-bar { - margin-bottom: 1rem; + .abort { + font-size: 1.2rem; + margin-left: 2rem; } - .abort-container { - display: flex; - align-items: center; - margin-bottom: 2rem; - - .abort { - font-size: 1.2rem; - margin-left: 2rem; - } - - .abort-2 { - font-size: 1.2rem; - margin-left: 2rem; - white-space: nowrap; - } + .abort-2 { + font-size: 1.2rem; + margin-left: 2rem; + white-space: nowrap; } } -.margin-right { - margin-right: 0.5rem; -} +.app-create-content { + padding-left: 4.5rem; -.full-width { - width: 100%; -} - -.stepper { - background: inherit !important; - margin: 0 -1.5rem; - - .formfield { + .name-formfield { max-width: 400px; + display: block; } - .step-title { - font-size: 1rem; - text-transform: uppercase; - letter-spacing: 0.05em; + .app-create-container { + padding-top: 2rem; + + .progress-bar { + margin-bottom: 1rem; + } } - .step-description { - font-size: 0.9rem; + .margin-right { + margin-right: 0.5rem; } -} -.checkbox-container { - display: flex; - flex-direction: column; - - .checkbox { - margin: 0.5rem 0; + .full-width { + width: 100%; } -} -.row { - display: flex; - justify-content: space-between; - - .left, - .right { - margin-bottom: 0.5rem; - font-size: 14px; - } -} - -.app-create-actions { - margin-top: 1rem; - display: flex; - - .fill-space { - flex: 1; - } -} - -.dev { - .content { - display: flex; - margin: 0 -0.5rem; - flex-wrap: wrap; - flex-direction: row; + .stepper { + background: inherit !important; + margin: 0 -1.5rem; .formfield { - flex: 1; - box-sizing: border-box; - margin: 0 0.5rem; + max-width: 400px; + } - &.full-width { - flex-basis: 80%; - } + .step-title { + font-size: 1rem; + text-transform: uppercase; + letter-spacing: 0.05em; + } + + .step-description { + font-size: 0.9rem; } } - .continue-button { - margin-top: 3rem; - display: block; - padding: 0.5rem 4rem; - float: right; + .checkbox-container { + display: flex; + flex-direction: column; + + .checkbox { + margin: 0.5rem 0; + } + } + + .row { + display: flex; + justify-content: space-between; + + .left, + .right { + margin-bottom: 0.5rem; + font-size: 14px; + } + } + + .app-create-actions { + margin-top: 1rem; + display: flex; + align-items: center; + + .bck-button { + margin-right: 1rem; + } + + .create-button { + padding: 0.5rem 4rem; + } + } + + .dev { + .content { + display: flex; + margin: 0 -0.5rem; + flex-wrap: wrap; + flex-direction: row; + + .formfield { + flex: 1; + box-sizing: border-box; + margin: 0 0.5rem; + + &.full-width { + flex-basis: 80%; + } + } + } + + .continue-button { + margin-top: 3rem; + display: block; + padding: 0.5rem 4rem; + } } } diff --git a/console/src/app/pages/projects/apps/app-create/app-create.component.ts b/console/src/app/pages/projects/apps/app-create/app-create.component.ts index 268b6c3e70..46e541687f 100644 --- a/console/src/app/pages/projects/apps/app-create/app-create.component.ts +++ b/console/src/app/pages/projects/apps/app-create/app-create.component.ts @@ -49,6 +49,9 @@ export class AppCreateComponent implements OnInit, OnDestroy { public projectId: string = ''; public loading: boolean = false; + public createSteps: number = 4; + public currentCreateStep: number = 1; + public oidcAppRequest: AddOIDCAppRequest.AsObject = new AddOIDCAppRequest().toObject(); public apiAppRequest: AddAPIAppRequest.AsObject = new AddAPIAppRequest().toObject(); @@ -270,6 +273,8 @@ export class AppCreateComponent implements OnInit, OnDestroy { } public changeStep(event: StepperSelectionEvent): void { + this.currentCreateStep = event.selectedIndex + 1; + if (event.selectedIndex >= 2) { this.requestRedirectValuesSubject$.next(); } diff --git a/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.html b/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.html index b8c44defbc..acb5d7e992 100644 --- a/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.html +++ b/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.html @@ -1,32 +1,54 @@ - + stateTooltip="{{ 'ORG.STATE.' + project?.state | translate }}" + [hasContributors]="true" +>

- {{'PROJECT.PAGES.ZITADELPROJECT' | translate}} + {{ 'PROJECT.PAGES.ZITADELPROJECT' | translate }}

- +
- - - + + + @@ -34,6 +56,5 @@
-
-
\ No newline at end of file +
diff --git a/console/src/app/pages/projects/owned-projects/project-role-create/project-role-create.component.ts b/console/src/app/pages/projects/owned-projects/project-role-create/project-role-create.component.ts index 06806065a3..a30f361634 100644 --- a/console/src/app/pages/projects/owned-projects/project-role-create/project-role-create.component.ts +++ b/console/src/app/pages/projects/owned-projects/project-role-create/project-role-create.component.ts @@ -89,7 +89,7 @@ export class ProjectRoleCreateComponent implements OnInit, OnDestroy { .bulkAddProjectRoles(this.projectId, rolesToAdd) .then(() => { this.toast.showInfo('PROJECT.TOAST.ROLESCREATED', true); - this.router.navigate(['projects', this.projectId, 'roles']); + this.router.navigate(['projects', this.projectId], { queryParams: { id: 'roles' } }); }) .catch((error) => { this.toast.showError(error); diff --git a/console/src/app/pages/projects/project-create/project-create.component.html b/console/src/app/pages/projects/project-create/project-create.component.html index 5f74bcfe42..f2882d3a37 100644 --- a/console/src/app/pages/projects/project-create/project-create.component.html +++ b/console/src/app/pages/projects/project-create/project-create.component.html @@ -4,27 +4,31 @@ - {{ 'PROJECT.PAGES.CREATE' | translate }}Step - {{ currentCreateStep }} of - {{ createSteps }} + {{ 'PROJECT.PAGES.CREATE' | translate }}
-

{{'PROJECT.PAGES.CREATE_DESC' | translate}}

+

{{ 'PROJECT.PAGES.CREATE_DESC' | translate }}

- {{'PROJECT.NAME' | translate}} - + {{ 'PROJECT.NAME' | translate }} +
-
- \ No newline at end of file + diff --git a/console/src/app/pages/projects/project-create/project-create.component.scss b/console/src/app/pages/projects/project-create/project-create.component.scss index ef3aa58acd..07df0ea65a 100644 --- a/console/src/app/pages/projects/project-create/project-create.component.scss +++ b/console/src/app/pages/projects/project-create/project-create.component.scss @@ -11,12 +11,6 @@ h1 { font-size: 1.2rem; margin-left: 2rem; } - - .abort-2 { - font-size: 1.2rem; - margin-left: 2rem; - white-space: nowrap; - } } .project-create-content { diff --git a/console/src/app/pages/projects/project-create/project-create.component.ts b/console/src/app/pages/projects/project-create/project-create.component.ts index 56809860e7..fdff97946e 100644 --- a/console/src/app/pages/projects/project-create/project-create.component.ts +++ b/console/src/app/pages/projects/project-create/project-create.component.ts @@ -28,9 +28,6 @@ export class ProjectCreateComponent { breadcrumbService.setBreadcrumb([bread]); } - public createSteps: number = 1; - public currentCreateStep: number = 1; - public saveProject(): void { this.mgmtService .addProject(this.project) diff --git a/console/src/app/pages/projects/project-grid/project-grid.component.html b/console/src/app/pages/projects/project-grid/project-grid.component.html index 28f4f1a7db..59edac1a4d 100644 --- a/console/src/app/pages/projects/project-grid/project-grid.component.html +++ b/console/src/app/pages/projects/project-grid/project-grid.component.html @@ -1,79 +1,95 @@
-
- - +
+
-
+ [ngClass]="{ inactive: item.state !== ProjectState.PROJECT_STATE_ACTIVE }" + >
- {{'PROJECT.PAGES.LASTMODIFIED' | - translate}} - {{ item.details.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' }} + {{ 'PROJECT.PAGES.LASTMODIFIED' | translate }} + {{ item.details.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' }}
{{ $any(item).name }} {{ $any(item).projectName }} -
-
+
- {{'PROJECT.PAGES.CREATEDON' | - translate}} - {{ item.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' }} + {{ 'PROJECT.PAGES.CREATEDON' | translate }} + {{ item.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' }}
- - + +
-
+ [ngClass]="{ inactive: item.state !== ProjectState.PROJECT_STATE_ACTIVE }" + [attr.data-e2e]="'grid-card'" + >
- {{'PROJECT.PAGES.LASTMODIFIED' | translate}} - {{ item.details.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' }} + {{ 'PROJECT.PAGES.LASTMODIFIED' | translate }} + {{ item.details.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' }}
{{ $any(item).name }} {{ $any(item).projectName }} -
-
+
- {{$any(item).projectOwnerName}} - {{'PROJECT.PAGES.CREATEDON' | - translate}} - {{ - item.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' - }} + {{ $any(item).projectOwnerName }} + {{ 'PROJECT.PAGES.CREATEDON' | translate }} + {{ item.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' }}
- + - +

- {{'PROJECT.PAGES.NOITEMS' | - translate}}

+ {{ 'PROJECT.PAGES.NOITEMS' | translate }} +

add - {{'PROJECT.PAGES.ADDNEW' | translate}} + {{ 'PROJECT.PAGES.ADDNEW' | translate }}
@@ -83,17 +99,28 @@
- - - \ No newline at end of file + diff --git a/console/src/app/pages/projects/project-grid/project-grid.component.scss b/console/src/app/pages/projects/project-grid/project-grid.component.scss index d5a3c95ec1..39644ef255 100644 --- a/console/src/app/pages/projects/project-grid/project-grid.component.scss +++ b/console/src/app/pages/projects/project-grid/project-grid.component.scss @@ -25,17 +25,12 @@ } } -.spinner { - margin: 1rem; -} - .grid-main-container { position: relative; .loading-sp-wrapper { - position: absolute; - top: 0; - left: 0; + display: block; + margin: 1rem 0.5rem 0 0.5rem; } .owned-project-grid-container { diff --git a/console/src/app/pages/projects/project-grid/project-grid.component.ts b/console/src/app/pages/projects/project-grid/project-grid.component.ts index 637975c05b..fba5dc358f 100644 --- a/console/src/app/pages/projects/project-grid/project-grid.component.ts +++ b/console/src/app/pages/projects/project-grid/project-grid.component.ts @@ -144,7 +144,6 @@ export class ProjectGridComponent implements OnInit, OnDestroy { this.loadingSubject.next(false); }) .catch((error) => { - console.error(error); this.toast.showError(error); this.loadingSubject.next(false); }); diff --git a/console/src/app/pages/projects/projects.component.html b/console/src/app/pages/projects/projects.component.html index 0c9bdb0f61..d8dede91ed 100644 --- a/console/src/app/pages/projects/projects.component.html +++ b/console/src/app/pages/projects/projects.component.html @@ -10,12 +10,20 @@
- - + +
- +
-
\ No newline at end of file + diff --git a/console/src/app/pages/projects/projects.component.ts b/console/src/app/pages/projects/projects.component.ts index f308a6bb65..022e2b81ad 100644 --- a/console/src/app/pages/projects/projects.component.ts +++ b/console/src/app/pages/projects/projects.component.ts @@ -53,6 +53,7 @@ export class ProjectsComponent { type: type === ProjectType.PROJECTTYPE_OWNED ? 'owned' : type === ProjectType.PROJECTTYPE_GRANTED ? 'granted' : 'owned', }, + replaceUrl: true, queryParamsHandling: 'merge', skipLocationChange: false, }); diff --git a/console/src/app/pages/user-grant-create/user-grant-create.component.html b/console/src/app/pages/user-grant-create/user-grant-create.component.html index 4fda144908..4df3f75af5 100644 --- a/console/src/app/pages/user-grant-create/user-grant-create.component.html +++ b/console/src/app/pages/user-grant-create/user-grant-create.component.html @@ -4,53 +4,64 @@ -

{{ 'GRANTS.CREATE.TITLE' | translate }}

Step - {{ currentCreateStep }} of - {{ STEPS }} +

{{ 'GRANTS.CREATE.TITLE' | translate }}

+ Step {{ currentCreateStep }} of {{ STEPS }}

- {{'PROJECT.GRANT.CREATE.ORG_DESCRIPTION' | translate: org}} -
- {{'PROJECT.GRANT.CREATE.ORG_DESCRIPTION_DESC' | translate}} + {{ 'PROJECT.GRANT.CREATE.ORG_DESCRIPTION' | translate: org }} +
+ {{ 'PROJECT.GRANT.CREATE.ORG_DESCRIPTION_DESC' | translate }}

-

{{'PROJECT.GRANT.CREATE.SEL_USER' | translate}}

+

{{ 'PROJECT.GRANT.CREATE.SEL_USER' | translate }}

- +
- + - +
-

{{'PROJECT.GRANT.CREATE.SEL_ROLES' | translate}}

+

{{ 'PROJECT.GRANT.CREATE.SEL_ROLES' | translate }}

+ {{ $any(project)?.grantId }} + [grantId]="$any(grantedProject)?.grantId ? $any(grantedProject)?.grantId : ''" + >
- @@ -66,4 +77,4 @@
- \ No newline at end of file + diff --git a/console/src/app/pages/users/user-create/user-create.component.html b/console/src/app/pages/users/user-create/user-create.component.html index 4f725693ab..dd7f23276f 100644 --- a/console/src/app/pages/users/user-create/user-create.component.html +++ b/console/src/app/pages/users/user-create/user-create.component.html @@ -1,11 +1,10 @@
- + close -

{{ 'USER.CREATE.TITLE' | translate }}

Step - 1 of 1 +

{{ 'USER.CREATE.TITLE' | translate }}

@@ -13,63 +12,69 @@
-

{{ 'USER.CREATE.NAMEANDEMAILSECTION' | translate }}

- - {{ 'USER.PROFILE.EMAIL' | translate }}* - - - {{ 'USER.VALIDATION.NOTANEMAIL' | translate }} - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.USERNAME' | translate }}* - - {{envSuffixLabel}} +

{{ 'USER.CREATE.NAMEANDEMAILSECTION' | translate }}

- - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - {{ 'USER.VALIDATION.NOEMAIL' | translate }} - -
-
-
- - {{ 'USER.PROFILE.FIRSTNAME' | translate }}* - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.LASTNAME' | translate }}* - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.NICKNAME' | translate }} - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - +
+ + {{ 'USER.PROFILE.EMAIL' | translate }}* + + + {{ 'USER.VALIDATION.NOTANEMAIL' | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PROFILE.USERNAME' | translate }}* + + {{ envSuffixLabel }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + {{ 'USER.VALIDATION.NOEMAIL' | translate }} + + + + + {{ 'USER.PROFILE.FIRSTNAME' | translate }}* + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PROFILE.LASTNAME' | translate }}* + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PROFILE.NICKNAME' | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + +
@@ -77,59 +82,67 @@ - - - {{ 'USER.PASSWORD.NEWINITIAL' | translate }} - + +
+ + {{ 'USER.PASSWORD.NEWINITIAL' | translate }} + - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PASSWORD.CONFIRMINITIAL' | translate }} + - - - {{ 'USER.PASSWORD.CONFIRMINITIAL' | translate }} - - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - {{ 'USER.PASSWORD.NOTEQUAL' | translate }} - - + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + {{ 'USER.PASSWORD.NOTEQUAL' | translate }} + + +
-

{{ 'USER.CREATE.GENDERLANGSECTION' | translate }}

+

{{ 'USER.CREATE.GENDERLANGSECTION' | translate }}

- - {{ 'USER.PROFILE.GENDER' | translate }} - - - {{ 'GENDERS.'+gender | translate }} - - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.PREFERRED_LANGUAGE' | translate }} - - - {{ 'LANGUAGES.'+language | translate }} - - +
+ + {{ 'USER.PROFILE.GENDER' | translate }} + + + {{ 'GENDERS.' + gender | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} - - + + + {{ 'USER.PROFILE.PREFERRED_LANGUAGE' | translate }} + + + {{ 'LANGUAGES.' + language | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + +
-

{{ 'USER.CREATE.ADDRESSANDPHONESECTION' | translate }}

+

{{ 'USER.CREATE.ADDRESSANDPHONESECTION' | translate }}

- + {{ 'USER.PROFILE.PHONE' | translate }} @@ -138,12 +151,17 @@
- +
- \ No newline at end of file + diff --git a/console/src/app/pages/users/user-create/user-create.component.scss b/console/src/app/pages/users/user-create/user-create.component.scss index f5f18677fa..e3206b2f9c 100644 --- a/console/src/app/pages/users/user-create/user-create.component.scss +++ b/console/src/app/pages/users/user-create/user-create.component.scss @@ -7,20 +7,47 @@ font-size: 1.2rem; margin-left: 2rem; } - - .abort-2 { - font-size: 1.2rem; - margin-left: 2rem; - white-space: nowrap; - } } .user-create-main-content { padding-left: 4.5rem; max-width: 35rem; + @media only screen and (max-width: 500px) { + padding: 0 0.5rem; + } + .user-create-form { - padding-top: 1rem; + .user-create-content { + .user-create-section { + padding: 1rem 0 0 0; + flex-basis: 100%; + font-size: 14px; + letter-spacing: 0.05em; + text-transform: uppercase; + } + + .user-create-grid { + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 1rem; + + @media only screen and (max-width: 500px) { + grid-template-columns: 1fr; + } + } + + .email-is-verified, + .use-password-block { + flex-basis: 100%; + margin-top: 1.5rem; + + .block-checkbox { + display: block; + margin: 0.25rem 0; + } + } + } .user-create-btn-container { button { @@ -32,49 +59,9 @@ } } - .user-create-content { - display: flex; - flex-wrap: wrap; - flex-direction: row; - margin: 0 -0.5rem; - - .user-create-section { - padding: 0.5rem; - flex-basis: 100%; - font-size: 0.9rem; - letter-spacing: 0.05em; - text-transform: uppercase; - } - - .formfield { - flex: 1 0 33%; - margin: 0 0.5rem; - } - - .email-is-verified, - .use-password-block { - margin: 0 0.5rem; - flex-basis: 100%; - margin-top: 1.5rem; - - .block-checkbox { - display: block; - margin: 0.25rem 0; - } - } - } - .pwd-section { - margin: 0 0.5rem; - .section { padding: 0.5rem 0; } - - .user-create-pwd-form { - display: grid; - grid-template-columns: 1fr 1fr; - grid-gap: 1rem; - } } } diff --git a/console/src/app/pages/users/user-create/user-create.component.ts b/console/src/app/pages/users/user-create/user-create.component.ts index 9761f796a6..5e5b1d2e27 100644 --- a/console/src/app/pages/users/user-create/user-create.component.ts +++ b/console/src/app/pages/users/user-create/user-create.component.ts @@ -75,7 +75,7 @@ export class UserCreateComponent implements OnDestroy { this.loading = true; this.loadOrg(); this.mgmtService - .getOrgIAMPolicy() + .getDomainPolicy() .then((resp) => { if (resp.policy?.userLoginMustBeDomain) { this.userLoginMustBeDomain = resp.policy.userLoginMustBeDomain; diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html index 3da4a1f0a7..0995f5a59c 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html @@ -40,7 +40,9 @@ -

{{ 'USER.PAGES.NOUSER' | translate }}

+
+

{{ 'USER.PAGES.NOUSER' | translate }}

+
diff --git a/console/src/app/pages/users/user-list/user-table/user-table.component.ts b/console/src/app/pages/users/user-list/user-table/user-table.component.ts index b185254a87..f5034e4e41 100644 --- a/console/src/app/pages/users/user-list/user-table/user-table.component.ts +++ b/console/src/app/pages/users/user-list/user-table/user-table.component.ts @@ -76,6 +76,7 @@ export class UserTableComponent implements OnInit { public ActionKeysType: any = ActionKeysType; public filterOpen: boolean = false; + private searchQueries: SearchQuery[] = []; constructor( private router: Router, public translate: TranslateService, @@ -109,6 +110,7 @@ export class UserTableComponent implements OnInit { queryParams: { type: type === Type.TYPE_HUMAN ? 'human' : type === Type.TYPE_MACHINE ? 'machine' : 'human', }, + replaceUrl: true, queryParamsHandling: 'merge', skipLocationChange: false, }); @@ -225,14 +227,12 @@ export class UserTableComponent implements OnInit { } public refreshPage(): void { - this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type); + this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type, this.searchQueries); } public sortChange(sortState: Sort) { - console.log(sortState.active, sortState.direction); - if (sortState.direction && sortState.active) { - this._liveAnnouncer.announce(`Sorted ${sortState.direction}ending`); + this._liveAnnouncer.announce(`Sorted ${sortState.direction} ending`); this.refreshPage(); } else { this._liveAnnouncer.announce('Sorting cleared'); @@ -241,6 +241,7 @@ export class UserTableComponent implements OnInit { public applySearchQuery(searchQueries: SearchQuery[]): void { this.selection.clear(); + this.searchQueries = searchQueries; this.getData( this.paginator ? this.paginator.pageSize : this.INITIAL_PAGE_SIZE, this.paginator ? this.paginator.pageIndex * this.paginator.pageSize : 0, diff --git a/console/src/app/services/admin.service.ts b/console/src/app/services/admin.service.ts index c9736cc78f..84f0eb922d 100644 --- a/console/src/app/services/admin.service.ts +++ b/console/src/app/services/admin.service.ts @@ -3,7 +3,7 @@ import { Injectable } from '@angular/core'; import { ActivateLabelPolicyRequest, ActivateLabelPolicyResponse, - AddCustomOrgIAMPolicyRequest, + AddCustomDomainPolicyRequest, AddCustomOrgIAMPolicyResponse, AddIAMMemberRequest, AddIAMMemberResponse, @@ -23,12 +23,12 @@ import { DeactivateIDPResponse, GetCustomDomainClaimedMessageTextRequest, GetCustomDomainClaimedMessageTextResponse, + GetCustomDomainPolicyRequest, + GetCustomDomainPolicyResponse, GetCustomInitMessageTextRequest, GetCustomInitMessageTextResponse, GetCustomLoginTextsRequest, GetCustomLoginTextsResponse, - GetCustomOrgIAMPolicyRequest, - GetCustomOrgIAMPolicyResponse, GetCustomPasswordlessRegistrationMessageTextRequest, GetCustomPasswordlessRegistrationMessageTextResponse, GetCustomPasswordResetMessageTextRequest, @@ -53,6 +53,8 @@ import { GetDefaultVerifyEmailMessageTextResponse, GetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextResponse, + GetDomainPolicyRequest, + GetDomainPolicyResponse, GetFileSystemNotificationProviderRequest, GetFileSystemNotificationProviderResponse, GetIDPByIDRequest, @@ -67,8 +69,6 @@ import { GetLogNotificationProviderResponse, GetOIDCSettingsRequest, GetOIDCSettingsResponse, - GetOrgIAMPolicyRequest, - GetOrgIAMPolicyResponse, GetPasswordAgePolicyRequest, GetPasswordAgePolicyResponse, GetPasswordComplexityPolicyRequest, @@ -130,10 +130,10 @@ import { RemoveMultiFactorFromLoginPolicyResponse, RemoveSecondFactorFromLoginPolicyRequest, RemoveSecondFactorFromLoginPolicyResponse, + ResetCustomDomainPolicyToDefaultRequest, + ResetCustomDomainPolicyToDefaultResponse, ResetCustomLoginTextsToDefaultRequest, ResetCustomLoginTextsToDefaultResponse, - ResetCustomOrgIAMPolicyToDefaultRequest, - ResetCustomOrgIAMPolicyToDefaultResponse, SetCustomLoginTextsRequest, SetCustomLoginTextsResponse, SetDefaultDomainClaimedMessageTextRequest, @@ -152,8 +152,10 @@ import { SetDefaultVerifyPhoneMessageTextResponse, SetUpOrgRequest, SetUpOrgResponse, - UpdateCustomOrgIAMPolicyRequest, - UpdateCustomOrgIAMPolicyResponse, + UpdateCustomDomainPolicyRequest, + UpdateCustomDomainPolicyResponse, + UpdateDomainPolicyRequest, + UpdateDomainPolicyResponse, UpdateIAMMemberRequest, UpdateIAMMemberResponse, UpdateIDPJWTConfigRequest, @@ -170,8 +172,6 @@ import { UpdateLoginPolicyResponse, UpdateOIDCSettingsRequest, UpdateOIDCSettingsResponse, - UpdateOrgIAMPolicyRequest, - UpdateOrgIAMPolicyResponse, UpdatePasswordAgePolicyRequest, UpdatePasswordAgePolicyResponse, UpdatePasswordComplexityPolicyRequest, @@ -599,52 +599,35 @@ export class AdminService { return this.grpcService.admin.updateSecretGenerator(req, null).then((resp) => resp.toObject()); } - /* org iam */ + /* org domain policy */ - public getCustomOrgIAMPolicy(orgId: string): Promise { - const req = new GetCustomOrgIAMPolicyRequest(); + public getDomainPolicy(): Promise { + const req = new GetDomainPolicyRequest(); + return this.grpcService.admin.getDomainPolicy(req, null).then((resp) => resp.toObject()); + } + + public updateDomainPolicy(req: UpdateDomainPolicyRequest): Promise { + return this.grpcService.admin.updateDomainPolicy(req, null).then((resp) => resp.toObject()); + } + + public getCustomDomainPolicy(orgId: string): Promise { + const req = new GetCustomDomainPolicyRequest(); req.setOrgId(orgId); - return this.grpcService.admin.getCustomOrgIAMPolicy(req, null).then((resp) => resp.toObject()); + return this.grpcService.admin.getCustomDomainPolicy(req, null).then((resp) => resp.toObject()); } - public addCustomOrgIAMPolicy( - orgId: string, - userLoginMustBeDomain: boolean, - ): Promise { - const req = new AddCustomOrgIAMPolicyRequest(); + public addCustomDomainPolicy(req: AddCustomDomainPolicyRequest): Promise { + return this.grpcService.admin.addCustomDomainPolicy(req, null).then((resp) => resp.toObject()); + } + + public updateCustomDomainPolicy(req: UpdateCustomDomainPolicyRequest): Promise { + return this.grpcService.admin.updateCustomDomainPolicy(req, null).then((resp) => resp.toObject()); + } + + public resetCustomDomainPolicyToDefault(orgId: string): Promise { + const req = new ResetCustomDomainPolicyToDefaultRequest(); req.setOrgId(orgId); - req.setUserLoginMustBeDomain(userLoginMustBeDomain); - - return this.grpcService.admin.addCustomOrgIAMPolicy(req, null).then((resp) => resp.toObject()); - } - - public updateCustomOrgIAMPolicy( - orgId: string, - userLoginMustBeDomain: boolean, - ): Promise { - const req = new UpdateCustomOrgIAMPolicyRequest(); - req.setOrgId(orgId); - req.setUserLoginMustBeDomain(userLoginMustBeDomain); - return this.grpcService.admin.updateCustomOrgIAMPolicy(req, null).then((resp) => resp.toObject()); - } - - public resetCustomOrgIAMPolicyToDefault(orgId: string): Promise { - const req = new ResetCustomOrgIAMPolicyToDefaultRequest(); - req.setOrgId(orgId); - return this.grpcService.admin.resetCustomOrgIAMPolicyToDefault(req, null).then((resp) => resp.toObject()); - } - - /* admin iam */ - - public getOrgIAMPolicy(): Promise { - const req = new GetOrgIAMPolicyRequest(); - return this.grpcService.admin.getOrgIAMPolicy(req, null).then((resp) => resp.toObject()); - } - - public updateOrgIAMPolicy(userLoginMustBeDomain: boolean): Promise { - const req = new UpdateOrgIAMPolicyRequest(); - req.setUserLoginMustBeDomain(userLoginMustBeDomain); - return this.grpcService.admin.updateOrgIAMPolicy(req, null).then((resp) => resp.toObject()); + return this.grpcService.admin.resetCustomDomainPolicyToDefault(req, null).then((resp) => resp.toObject()); } /* policies end */ diff --git a/console/src/app/services/grpc-auth.service.ts b/console/src/app/services/grpc-auth.service.ts index 87c69f051b..93be4880f1 100644 --- a/console/src/app/services/grpc-auth.service.ts +++ b/console/src/app/services/grpc-auth.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { SortDirection } from '@angular/material/sort'; import { OAuthService } from 'angular-oauth2-oidc'; import { BehaviorSubject, from, merge, Observable, of, Subject } from 'rxjs'; import { catchError, filter, finalize, map, mergeMap, switchMap, take, timeout } from 'rxjs/operators'; @@ -83,7 +84,7 @@ import { } from '../proto/generated/zitadel/auth_pb'; import { ChangeQuery } from '../proto/generated/zitadel/change_pb'; import { ListQuery } from '../proto/generated/zitadel/object_pb'; -import { Org, OrgQuery } from '../proto/generated/zitadel/org_pb'; +import { Org, OrgFieldName, OrgQuery } from '../proto/generated/zitadel/org_pb'; import { Gender, MembershipQuery, User, WebAuthNVerification } from '../proto/generated/zitadel/user_pb'; import { GrpcService } from './grpc.service'; import { StorageKey, StorageLocation, StorageService } from './storage.service'; @@ -262,6 +263,8 @@ export class GrpcAuthService { limit?: number, offset?: number, queryList?: OrgQuery[], + sortingColumn?: OrgFieldName, + sortingDirection?: SortDirection, ): Promise { const req = new ListMyProjectOrgsRequest(); const query = new ListQuery(); @@ -274,6 +277,9 @@ export class GrpcAuthService { if (queryList) { req.setQueriesList(queryList); } + // if (sortingColumn) { + // req.setSortingColumn(sortingColumn); + // } req.setQuery(query); diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index 1d6e19a06f..11cf9ed74e 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -131,6 +131,8 @@ import { GetDefaultVerifyEmailMessageTextResponse, GetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextResponse, + GetDomainPolicyRequest, + GetDomainPolicyResponse, GetFlowRequest, GetFlowResponse, GetGrantedProjectByIDRequest, @@ -155,8 +157,6 @@ import { GetOIDCInformationResponse, GetOrgByDomainGlobalRequest, GetOrgByDomainGlobalResponse, - GetOrgIAMPolicyRequest, - GetOrgIAMPolicyResponse, GetOrgIDPByIDRequest, GetOrgIDPByIDResponse, GetPasswordAgePolicyRequest, @@ -1225,9 +1225,10 @@ export class ManagementService { const req = new RemoveCustomLabelPolicyLogoDarkRequest(); return this.grpcService.mgmt.removeCustomLabelPolicyLogoDark(req, null).then((resp) => resp.toObject()); } - public getOrgIAMPolicy(): Promise { - const req = new GetOrgIAMPolicyRequest(); - return this.grpcService.mgmt.getOrgIAMPolicy(req, null).then((resp) => resp.toObject()); + + public getDomainPolicy(): Promise { + const req = new GetDomainPolicyRequest(); + return this.grpcService.mgmt.getDomainPolicy(req, null).then((resp) => resp.toObject()); } public getPasswordAgePolicy(): Promise { diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index d39209b4af..121b701c6b 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -818,6 +818,7 @@ "NOTIFICATIONS": "Benachrichtigungen", "MESSAGETEXTS": "Benachrichtigungstexte", "IDP": "Identity Provider", + "DOMAIN": "Domain Einstellungen", "LOGINTEXTS": "Login Interface Texte", "BRANDING": "Branding", "PRIVACYPOLICY": "Datenschutzrichtlinie", @@ -827,6 +828,7 @@ "GROUPS": { "NOTIFICATIONS": "Benachrichtigungen", "LOGIN": "Login und Zugriff", + "DOMAIN": "Domain", "TEXTS": "Texte und Sprachen", "APPEARANCE": "Erscheinungsbild", "OTHER": "Anderes" @@ -846,6 +848,8 @@ "HOST": "Host", "USER": "Benutzer", "PASSWORD": "Passwort", + "SETPASSWORD": "SMTP Passwort setzen", + "PASSWORDSET": "SMTP Passwort erfolgrech gesetzt.", "TLS": "Transport Layer Security (TLS)", "SAVED": "Erfolgreich gespeichert.", "REQUIREDWARN": "Damit Mails von Ihrer Domain verschickt werden können, müssen Sie Ihre SMTP Einstellungen konfigurieren." @@ -949,9 +953,8 @@ "TITLE": "Passwortsperre", "DESCRIPTION": "Lege eine maximale Anzahl an Passwordwiederholungen fest, nachdem Accounts gesperrt werden sollen." }, - "IAM_POLICY": { - "TITLE": "Zugangseinstellungen IAM", - "DESCRIPTION": "Definiere die Zugangseistellungen für Benutzer." + "DOMAIN_POLICY": { + "TITLE": "Domain Einstellungen" }, "PRIVATELABELING_POLICY": { "TITLE": "Branding", @@ -965,6 +968,7 @@ "DESCRIPTIONCREATEADMIN": "Nutzer können sich mit den verfügbaren Idps authentifizieren.", "DESCRIPTIONCREATEMGMT": "Nutzer können sich mit den verfügbaren Idps authentifizieren. Achtung: Es kann zwischen System- und organisationsspezifischen Providern gewählt werden.", "ADVANCED": "Erweitert", + "LIFETIMEDURATIONS": "Login Lifetimes", "SAVED": "Erfolgreich gespeichert." }, "PRIVACY_POLICY": { @@ -1080,7 +1084,9 @@ "MAXATTEMPTS": "Maximale Anzahl an Versuchen", "EXPIREWARNDAYS": "Ablauf Warnung nach Tagen", "MAXAGEDAYS": "Maximale Gültigkeit in Tagen", - "USERLOGINMUSTBEDOMAIN": "Benutzer-Login muss eine Domain sein", + "USERLOGINMUSTBEDOMAIN": "Benutzer Loginname muss die Domain der Organisation beinhalten", + "VALIDATEORGDOMAINS": "Org Domains validieren", + "SMTPSENDERADDRESSMATCHESINSTANCEDOMAIN": "SMTP Sender Addresse entspricht Instanzdomain", "ALLOWUSERNAMEPASSWORD": "Benutzername Passwort erlaubt", "ALLOWEXTERNALIDP": "Externer IDP erlaubt", "ALLOWREGISTER": "Registrieren erlaubt", @@ -1097,7 +1103,13 @@ "DEFAULTREDIRECTURI": "Default Redirect URI", "DEFAULTREDIRECTURI_DESC": "Definiert, wohin der Benutzer umgeleitet wird, wenn die Anmeldung ohne App-Kontext gestartet wurde (z. B. von Mail)", "ERRORMSGPOPUP": "Fehler als Dialog Fenster", - "DISABLEWATERMARK": "Wasserzeichen ausblenden" + "DISABLEWATERMARK": "Wasserzeichen ausblenden", + "PASSWORDCHECKLIFETIME": "Passwort Check Lifetime", + "EXTERNALLOGINCHECKLIFETIME": "Externer Login Check Lifetime", + "MFAINITSKIPLIFETIME": "Multifaktor Init Lifetime", + "SECONDFACTORCHECKLIFETIME": "Zweitfaktor Check Lifetime", + "MULTIFACTORCHECKLIFETIME": "Multifaktor Check Lifetime", + "INHOURS": "Stunden" }, "RESET": "Auf Instanzeinstellung zurücksetzen", "CREATECUSTOM": "Benutzerdefinierte Richtlinie erstellen", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index bdb32920f7..1a541ab360 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -818,6 +818,7 @@ "NOTIFICATIONS": "Notification providers and SMTP", "MESSAGETEXTS": "Message Texts", "IDP": "Identity Providers", + "DOMAIN": "Domain settings", "LOGINTEXTS": "Login Interface Texts", "BRANDING": "Branding", "PRIVACYPOLICY": "Privacy Policy", @@ -827,6 +828,7 @@ "GROUPS": { "NOTIFICATIONS": "Notifications", "LOGIN": "Login and Access", + "DOMAIN": "Domain", "TEXTS": "Texts and Languages", "APPEARANCE": "Appearance", "OTHER": "Other" @@ -846,6 +848,8 @@ "HOST": "Host", "USER": "User", "PASSWORD": "Password", + "SETPASSWORD": "Set SMTP Password", + "PASSWORDSET": "SMTP Password was set successfully.", "TLS": "Transport Layer Security (TLS)", "SAVED": "Saved successfully!", "REQUIREDWARN": "To send notifications from your domain, you have to enter your SMTP data." @@ -949,9 +953,8 @@ "TITLE": "Lockout Policy", "DESCRIPTION": "Set a maximum number of passwordretries, after which accounts will be blocked." }, - "IAM_POLICY": { - "TITLE": "IAM Access Preferences", - "DESCRIPTION": "Define access properties of your users." + "DOMAIN_POLICY": { + "TITLE": "Domain Settings" }, "PRIVATELABELING_POLICY": { "TITLE": "Branding", @@ -965,6 +968,7 @@ "DESCRIPTIONCREATEADMIN": "Users can choose from the available identity providers below.", "DESCRIPTIONCREATEMGMT": "Users can choose from the available identity providers below. Note: You can use System-set providers as well as providers set for your organization only.", "ADVANCED": "Advanced", + "LIFETIMEDURATIONS": "Login Lifetimes", "SAVED": "Saved successfully!" }, "PRIVACY_POLICY": { @@ -1080,7 +1084,9 @@ "MAXATTEMPTS": "Password maximum Attempts", "EXPIREWARNDAYS": "Expiration Warning after day", "MAXAGEDAYS": "Max Age in days", - "USERLOGINMUSTBEDOMAIN": "User Login must be Domain", + "USERLOGINMUSTBEDOMAIN": "User Loginname must contain orgdomain", + "VALIDATEORGDOMAINS": "Validate Org domains", + "SMTPSENDERADDRESSMATCHESINSTANCEDOMAIN": "SMTP Sender Address matches Instance Domain", "ALLOWUSERNAMEPASSWORD": "Username Password allowed", "ALLOWEXTERNALIDP": "External IDP allowed", "ALLOWREGISTER": "Register allowed", @@ -1097,7 +1103,13 @@ "DEFAULTREDIRECTURI": "Default Redirect URI", "DEFAULTREDIRECTURI_DESC": "Defines where the user will be redirected to if the login has started without an app context (e.g. from mail)", "ERRORMSGPOPUP": "Show Error in Dialog", - "DISABLEWATERMARK": "Hide Watermark" + "DISABLEWATERMARK": "Hide Watermark", + "PASSWORDCHECKLIFETIME": "Password Check Lifetime", + "EXTERNALLOGINCHECKLIFETIME": "External Login Check Lifetime", + "MFAINITSKIPLIFETIME": "Multifactor Init Lifetime", + "SECONDFACTORCHECKLIFETIME": "Second Factor Check Lifetime", + "MULTIFACTORCHECKLIFETIME": "Multifactor Check Lifetime", + "INHOURS": "hours" }, "RESET": "Reset to Instance default", "CREATECUSTOM": "Create Custom Policy", diff --git a/console/src/assets/i18n/it.json b/console/src/assets/i18n/it.json index 855cb34c6a..41e9553edd 100644 --- a/console/src/assets/i18n/it.json +++ b/console/src/assets/i18n/it.json @@ -818,6 +818,7 @@ "NOTIFICATIONS": "Notifiche", "MESSAGETEXTS": "Testi di notifica", "IDP": "Identity Providers", + "DOMAIN": "Impostazioni del dominio", "LOGINTEXTS": "Testi dell'interfaccia login", "BRANDING": "Branding", "PRIVACYPOLICY": "Informativa sulla privacy e TOS", @@ -827,6 +828,7 @@ "GROUPS": { "NOTIFICATIONS": "Notifiche", "LOGIN": "Accesso e login", + "DOMAIN": "Dominio", "TEXTS": "Testi e lingue", "APPEARANCE": "Aussehen", "OTHER": "Altro" @@ -846,6 +848,8 @@ "HOST": "Host", "USER": "Utente", "PASSWORD": "Password", + "SETPASSWORD": "Imposta SMTP Password", + "PASSWORDSET": "SMTP Password impostata con successo.", "TLS": "Transport Layer Security (TLS)", "SAVED": "Salvato con successo!", "REQUIREDWARN": "Per inviare notifiche dal tuo dominio, devi inserire i tuoi dati SMTP." @@ -949,9 +953,8 @@ "TITLE": "Impostazioni di blocco", "DESCRIPTION": "Imposta un numero massimo di tentativi di password, dopo i quali gli account saranno bloccati." }, - "IAM_POLICY": { - "TITLE": "Impostazioni di accesso IAM", - "DESCRIPTION": "Definisci le propriet\u00e0 di accesso dei tuoi utenti." + "DOMAIN_POLICY": { + "TITLE": "Impostazioni dominio" }, "PRIVATELABELING_POLICY": { "TITLE": "Branding", @@ -965,6 +968,7 @@ "DESCRIPTIONCREATEADMIN": "Gli utenti possono scegliere tra gli IDP disponibili qui sotto.", "DESCRIPTIONCREATEMGMT": "Gli utenti possono scegliere tra gli IDP disponibili qui sotto. Nota: puoi usare i provider impostati nel sistema e quelli impostati della tua organizzazione.", "ADVANCED": "Impostazioni avanzate", + "LIFETIMEDURATIONS": "Login Lifetimes", "SAVED": "Salvato con successo!" }, "PRIVACY_POLICY": { @@ -1080,7 +1084,9 @@ "MAXATTEMPTS": "Massimo numero di tentativi di password", "EXPIREWARNDAYS": "Avviso scadenza dopo il giorno", "MAXAGEDAYS": "Lunghezza massima in giorni", - "USERLOGINMUSTBEDOMAIN": "Loginname dell'utente deve contenere il dominio", + "USERLOGINMUSTBEDOMAIN": "Nome utente deve contenere il dominio dell' organizzazione", + "VALIDATEORGDOMAINS": "Verifica domini dell' organizzazione", + "SMTPSENDERADDRESSMATCHESINSTANCEDOMAIN": "L'indirizzo mittente SMTP corrisponde al dominio dell'istanza", "ALLOWUSERNAMEPASSWORD": "Autenticazione classica con password consentita", "ALLOWEXTERNALIDP": "IDP esterno consentito", "ALLOWREGISTER": "Registrazione consentita", @@ -1097,7 +1103,13 @@ "DEFAULTREDIRECTURI": "Default Redirect URI", "DEFAULTREDIRECTURI_DESC": "Definisce dove verrà reindirizzato l'utente se l'accesso è stato avviato senza un contesto dell'app (ad es. dall' email)", "ERRORMSGPOPUP": "Mostra l'errore nella finestra di dialogo", - "DISABLEWATERMARK": "Nascondi la filigrana" + "DISABLEWATERMARK": "Nascondi la filigrana", + "PASSWORDCHECKLIFETIME": "Lifetime verificazione password", + "EXTERNALLOGINCHECKLIFETIME": "Lifetime verificazione login esterno", + "MFAINITSKIPLIFETIME": "Lifetime Initalizzazione Multifattore", + "SECONDFACTORCHECKLIFETIME": "Lifetime Second Factor Lifetime", + "MULTIFACTORCHECKLIFETIME": "Lifetime Multi Factor", + "INHOURS": "ore" }, "RESET": "Ripristina l'impostazione dell'istanza", "CREATECUSTOM": "Crea un'impostazione personalizzata", diff --git a/console/src/component-themes.scss b/console/src/component-themes.scss index 2792c3b898..a3b1a20fc6 100644 --- a/console/src/component-themes.scss +++ b/console/src/component-themes.scss @@ -43,7 +43,6 @@ @import 'src/app/modules/filter/filter.component.scss'; @import 'src/app/modules/policies/message-texts/message-texts.component.scss'; @import 'src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.scss'; -@import 'src/app/modules/policies/private-labeling-policy/preview/preview.component.scss'; @import 'src/app/modules/info-row/info-row.component.scss'; @import 'src/app/modules/sidenav/sidenav.component'; @import 'src/app/modules/user-grants/user-grants.component.scss'; @@ -104,7 +103,6 @@ @include sidenav-theme($theme); @include info-section-theme($theme); @include filter-theme($theme); - @include preview-theme($theme); @include private-label-theme($theme); @include project-grid-theme($theme); @include granted-project-detail-theme($theme); diff --git a/console/src/styles.scss b/console/src/styles.scss index d3a71f0ea2..2cbf89b65d 100644 --- a/console/src/styles.scss +++ b/console/src/styles.scss @@ -425,10 +425,6 @@ $custom-typography: mat.define-typography-config( --success: #10b981; $border-color: map-get($foreground, divider); - .main-container { - color: map-get($foreground, base); - } - .mat-menu-panel { background-color: map-get($background, cards); transition: background-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); diff --git a/console/src/styles/toast.scss b/console/src/styles/toast.scss index 5ad34591a4..0bd6430626 100644 --- a/console/src/styles/toast.scss +++ b/console/src/styles/toast.scss @@ -1,14 +1,10 @@ @use '@angular/material' as mat; @mixin toast-theme($theme) { - $primary: map-get($theme, primary); - $primary-color: mat.get-color-from-palette($primary, 500); - $primary-light-color: mat.get-color-from-palette($primary, 200); $warn: map-get($theme, warn); $warn-color: mat.get-color-from-palette($warn, 500); $background: map-get($theme, background); $foreground: map-get($theme, foreground); - $is-dark-theme: map-get($theme, is-dark); // .data-e2e-success { // background-color: map-get($background, cards) !important; @@ -17,6 +13,6 @@ .data-e2e-failure { background-color: $warn-color !important; - color: map-get($foreground, text) !important; + color: mat.get-color-from-palette($warn, default-contrast) !important; } }