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 510ca0fcd1..4e8535fe76 100644
--- a/console/src/app/modules/filter-org/filter-org.component.html
+++ b/console/src/app/modules/filter-org/filter-org.component.html
@@ -46,4 +46,27 @@
+
+
+
{{ 'FILTER.PRIMARYDOMAIN' | translate }}
+
+
+
+
+
+ {{ 'FILTER.METHODS.' + method | translate }}
+
+
+
+
+
+
+
+
+
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 3a43b74195..8e100971d0 100644
--- a/console/src/app/modules/filter-org/filter-org.component.ts
+++ b/console/src/app/modules/filter-org/filter-org.component.ts
@@ -3,7 +3,7 @@ import { MatCheckboxChange } from '@angular/material/checkbox';
import { ActivatedRoute, Router } from '@angular/router';
import { take } from 'rxjs';
import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb';
-import { OrgNameQuery, OrgQuery, OrgState, OrgStateQuery } from 'src/app/proto/generated/zitadel/org_pb';
+import { OrgDomainQuery, OrgNameQuery, OrgQuery, OrgState, OrgStateQuery } from 'src/app/proto/generated/zitadel/org_pb';
import { UserNameQuery } from 'src/app/proto/generated/zitadel/user_pb';
import { FilterComponent } from '../filter/filter.component';
@@ -11,6 +11,7 @@ import { FilterComponent } from '../filter/filter.component';
enum SubQuery {
NAME,
STATE,
+ DOMAIN,
}
@Component({
@@ -52,6 +53,13 @@ export class FilterOrgComponent extends FilterComponent implements OnInit {
orgStateQuery.setState(filter.stateQuery.state);
orgQuery.setStateQuery(orgStateQuery);
return orgQuery;
+ } else if (filter.domainQuery) {
+ const orgQuery = new OrgQuery();
+ const orgDomainQuery = new OrgDomainQuery();
+ orgDomainQuery.setDomain(filter.domainQuery.domain);
+ orgDomainQuery.setMethod(filter.domainQuery.method);
+ orgQuery.setDomainQuery(orgDomainQuery);
+ return orgQuery;
} else {
return undefined;
}
@@ -83,6 +91,14 @@ export class FilterOrgComponent extends FilterComponent implements OnInit {
osq.setStateQuery(sq);
this.searchQueries.push(osq);
break;
+ case SubQuery.DOMAIN:
+ const dq = new OrgDomainQuery();
+ dq.setMethod(TextQueryMethod.TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE);
+ dq.setDomain('');
+ const odq = new OrgQuery();
+ odq.setDomainQuery(dq);
+ this.searchQueries.push(odq);
+ break;
}
} else {
switch (subquery) {
@@ -98,6 +114,12 @@ export class FilterOrgComponent extends FilterComponent implements OnInit {
this.searchQueries.splice(index_sn, 1);
}
break;
+ case SubQuery.DOMAIN:
+ const index_pdn = this.searchQueries.findIndex((q) => (q as OrgQuery).toObject().domainQuery !== undefined);
+ if (index_pdn > -1) {
+ this.searchQueries.splice(index_pdn, 1);
+ }
+ break;
}
}
}
@@ -113,6 +135,10 @@ export class FilterOrgComponent extends FilterComponent implements OnInit {
(query as OrgStateQuery).setState(value);
this.filterChanged.emit(this.searchQueries ? this.searchQueries : []);
break;
+ case SubQuery.DOMAIN:
+ (query as OrgDomainQuery).setDomain(value);
+ this.filterChanged.emit(this.searchQueries ? this.searchQueries : []);
+ break;
}
}
@@ -132,6 +158,13 @@ export class FilterOrgComponent extends FilterComponent implements OnInit {
} else {
return undefined;
}
+ case SubQuery.DOMAIN:
+ const pdn = this.searchQueries.find((q) => (q as OrgQuery).toObject().domainQuery !== undefined);
+ if (pdn) {
+ return (pdn as OrgQuery).getDomainQuery();
+ } else {
+ return undefined;
+ }
}
}
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 bc2fcc71aa..24bd9ea2af 100644
--- a/console/src/app/modules/org-table/org-table.component.ts
+++ b/console/src/app/modules/org-table/org-table.component.ts
@@ -88,7 +88,7 @@ export class OrgTableComponent {
}
return from(
- this.authService.listMyProjectOrgs(request.limit, request.offset, request.queries, sortingField, this.sort?.direction),
+ this.adminService.listOrgs(request.limit, request.offset, request.queries, sortingField, this.sort?.direction),
).pipe(
map((resp) => {
this.timestamp = resp.details?.viewTimestamp;
diff --git a/console/src/app/services/admin.service.ts b/console/src/app/services/admin.service.ts
index 8c79ac1713..17c8f1b323 100644
--- a/console/src/app/services/admin.service.ts
+++ b/console/src/app/services/admin.service.ts
@@ -159,6 +159,8 @@ import {
ListLoginPolicySecondFactorsResponse,
ListMilestonesRequest,
ListMilestonesResponse,
+ ListOrgsRequest,
+ ListOrgsResponse,
ListProvidersRequest,
ListProvidersResponse,
ListSecretGeneratorsRequest,
@@ -314,6 +316,8 @@ import {
MilestoneQuery,
MilestoneType,
} from '../proto/generated/zitadel/milestone/v1/milestone_pb';
+import { OrgFieldName, OrgQuery } from '../proto/generated/zitadel/org_pb';
+import { SortDirection } from '@angular/material/sort';
export interface OnboardingActions {
order: number;
@@ -1303,4 +1307,33 @@ export class AdminService {
public listMilestones(req: ListMilestonesRequest): Promise