mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-03 21:02:15 +00:00
feat(console-v2): login policy extension, domain policy, filter and UI fixes (#3644)
* show filter count when set * toast contrast color * fix notification settings, password dialog * app-create, user-create layout * domain policy * login-policy, project grid loader, i18n * login policy * login policy save lifetimes * private labeling optim * granted project grantId * smtp address matching * i18n * i18n * i18n * replace url strategy * fix privatelabeling color picker saving * stylelint Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
8d0cf9f368
commit
8baf0fe08c
@@ -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<GetCustomOrgIAMPolicyResponse.AsObject> {
|
||||
const req = new GetCustomOrgIAMPolicyRequest();
|
||||
public getDomainPolicy(): Promise<GetDomainPolicyResponse.AsObject> {
|
||||
const req = new GetDomainPolicyRequest();
|
||||
return this.grpcService.admin.getDomainPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateDomainPolicy(req: UpdateDomainPolicyRequest): Promise<UpdateDomainPolicyResponse.AsObject> {
|
||||
return this.grpcService.admin.updateDomainPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomDomainPolicy(orgId: string): Promise<GetCustomDomainPolicyResponse.AsObject> {
|
||||
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<AddCustomOrgIAMPolicyResponse.AsObject> {
|
||||
const req = new AddCustomOrgIAMPolicyRequest();
|
||||
public addCustomDomainPolicy(req: AddCustomDomainPolicyRequest): Promise<AddCustomOrgIAMPolicyResponse.AsObject> {
|
||||
return this.grpcService.admin.addCustomDomainPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateCustomDomainPolicy(req: UpdateCustomDomainPolicyRequest): Promise<UpdateCustomDomainPolicyResponse.AsObject> {
|
||||
return this.grpcService.admin.updateCustomDomainPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public resetCustomDomainPolicyToDefault(orgId: string): Promise<ResetCustomDomainPolicyToDefaultResponse.AsObject> {
|
||||
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<UpdateCustomOrgIAMPolicyResponse.AsObject> {
|
||||
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<ResetCustomOrgIAMPolicyToDefaultResponse.AsObject> {
|
||||
const req = new ResetCustomOrgIAMPolicyToDefaultRequest();
|
||||
req.setOrgId(orgId);
|
||||
return this.grpcService.admin.resetCustomOrgIAMPolicyToDefault(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
/* admin iam */
|
||||
|
||||
public getOrgIAMPolicy(): Promise<GetOrgIAMPolicyResponse.AsObject> {
|
||||
const req = new GetOrgIAMPolicyRequest();
|
||||
return this.grpcService.admin.getOrgIAMPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateOrgIAMPolicy(userLoginMustBeDomain: boolean): Promise<UpdateOrgIAMPolicyResponse.AsObject> {
|
||||
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 */
|
||||
|
||||
@@ -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<ListMyProjectOrgsResponse.AsObject> {
|
||||
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);
|
||||
|
||||
|
||||
@@ -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<GetOrgIAMPolicyResponse.AsObject> {
|
||||
const req = new GetOrgIAMPolicyRequest();
|
||||
return this.grpcService.mgmt.getOrgIAMPolicy(req, null).then((resp) => resp.toObject());
|
||||
|
||||
public getDomainPolicy(): Promise<GetDomainPolicyResponse.AsObject> {
|
||||
const req = new GetDomainPolicyRequest();
|
||||
return this.grpcService.mgmt.getDomainPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getPasswordAgePolicy(): Promise<GetPasswordAgePolicyResponse.AsObject> {
|
||||
|
||||
Reference in New Issue
Block a user