mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-05 22:02:15 +00:00
feat(console): message and login texts, privacy policy (#2016)
* message texts wrapper components * message-text sub, i18n, grid * fix routing * pack * pack * update material * audit * fix mgmt service for labelplcy * map conv * edit text from map * request map * fetch data, mgmt admin service * warn box, i18n * resetbtn * login texts * login text requests * reset, default, i18n * disabled, features, message text setter, service * locale switcher * policy grid * password reset, domain claimed i18n * lint files * fix admin service, i18n, lang setter * fix scss duplicate * privacy policy, cleanup grid, fix message, login texts (#2031) * policy grid everywhere 🦒 * cleanup home * log login text request * patch all data * refresh toggle * fix: add dialog for unsaved changes (#2057) * logintexts dialog * check for dialog on pairwise operation * fix: patch value to local state after save * fix: i18n and custom login texts (#2060) * fix: i18n and custom login texts * fix: tos and privacy texts * fix frontend * fix: tos and privacy texts and tests * fix: i18n, tos and privacy texts and tests * fix frontend maps * i18n * add ResetCustomLoginTextToDefault in admin api and fix template remove in handlers * resetlogintexttodefault Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
26e4e607bc
commit
2e684684de
@@ -19,10 +19,34 @@ import {
|
||||
ClearViewResponse,
|
||||
DeactivateIDPRequest,
|
||||
DeactivateIDPResponse,
|
||||
GetCustomDomainClaimedMessageTextRequest,
|
||||
GetCustomDomainClaimedMessageTextResponse,
|
||||
GetCustomInitMessageTextRequest,
|
||||
GetCustomInitMessageTextResponse,
|
||||
GetCustomLoginTextsRequest,
|
||||
GetCustomLoginTextsResponse,
|
||||
GetCustomOrgIAMPolicyRequest,
|
||||
GetCustomOrgIAMPolicyResponse,
|
||||
GetCustomPasswordResetMessageTextRequest,
|
||||
GetCustomPasswordResetMessageTextResponse,
|
||||
GetCustomVerifyEmailMessageTextRequest,
|
||||
GetCustomVerifyEmailMessageTextResponse,
|
||||
GetCustomVerifyPhoneMessageTextRequest,
|
||||
GetCustomVerifyPhoneMessageTextResponse,
|
||||
GetDefaultDomainClaimedMessageTextRequest,
|
||||
GetDefaultDomainClaimedMessageTextResponse,
|
||||
GetDefaultFeaturesRequest,
|
||||
GetDefaultFeaturesResponse,
|
||||
GetDefaultInitMessageTextRequest,
|
||||
GetDefaultInitMessageTextResponse,
|
||||
GetDefaultLoginTextsRequest,
|
||||
GetDefaultLoginTextsResponse,
|
||||
GetDefaultPasswordResetMessageTextRequest,
|
||||
GetDefaultPasswordResetMessageTextResponse,
|
||||
GetDefaultVerifyEmailMessageTextRequest,
|
||||
GetDefaultVerifyEmailMessageTextResponse,
|
||||
GetDefaultVerifyPhoneMessageTextRequest,
|
||||
GetDefaultVerifyPhoneMessageTextResponse,
|
||||
GetIDPByIDRequest,
|
||||
GetIDPByIDResponse,
|
||||
GetLabelPolicyRequest,
|
||||
@@ -41,6 +65,10 @@ import {
|
||||
GetPasswordLockoutPolicyResponse,
|
||||
GetPreviewLabelPolicyRequest,
|
||||
GetPreviewLabelPolicyResponse,
|
||||
GetPrivacyPolicyRequest,
|
||||
GetPrivacyPolicyResponse,
|
||||
GetSupportedLanguagesRequest,
|
||||
GetSupportedLanguagesResponse,
|
||||
IDPQuery,
|
||||
ListFailedEventsRequest,
|
||||
ListFailedEventsResponse,
|
||||
@@ -82,12 +110,26 @@ import {
|
||||
RemoveMultiFactorFromLoginPolicyResponse,
|
||||
RemoveSecondFactorFromLoginPolicyRequest,
|
||||
RemoveSecondFactorFromLoginPolicyResponse,
|
||||
ResetCustomLoginTextsToDefaultRequest,
|
||||
ResetCustomLoginTextsToDefaultResponse,
|
||||
ResetCustomOrgIAMPolicyToDefaultRequest,
|
||||
ResetCustomOrgIAMPolicyToDefaultResponse,
|
||||
ResetOrgFeaturesRequest,
|
||||
ResetOrgFeaturesResponse,
|
||||
SetCustomLoginTextsRequest,
|
||||
SetCustomLoginTextsResponse,
|
||||
SetDefaultDomainClaimedMessageTextRequest,
|
||||
SetDefaultDomainClaimedMessageTextResponse,
|
||||
SetDefaultFeaturesRequest,
|
||||
SetDefaultFeaturesResponse,
|
||||
SetDefaultInitMessageTextRequest,
|
||||
SetDefaultInitMessageTextResponse,
|
||||
SetDefaultPasswordResetMessageTextRequest,
|
||||
SetDefaultPasswordResetMessageTextResponse,
|
||||
SetDefaultVerifyEmailMessageTextRequest,
|
||||
SetDefaultVerifyEmailMessageTextResponse,
|
||||
SetDefaultVerifyPhoneMessageTextRequest,
|
||||
SetDefaultVerifyPhoneMessageTextResponse,
|
||||
SetOrgFeaturesRequest,
|
||||
SetOrgFeaturesResponse,
|
||||
SetUpOrgRequest,
|
||||
@@ -112,6 +154,8 @@ import {
|
||||
UpdatePasswordComplexityPolicyResponse,
|
||||
UpdatePasswordLockoutPolicyRequest,
|
||||
UpdatePasswordLockoutPolicyResponse,
|
||||
UpdatePrivacyPolicyRequest,
|
||||
UpdatePrivacyPolicyResponse,
|
||||
} from '../proto/generated/zitadel/admin_pb';
|
||||
import { SearchQuery } from '../proto/generated/zitadel/member_pb';
|
||||
import { ListQuery } from '../proto/generated/zitadel/object_pb';
|
||||
@@ -123,6 +167,114 @@ import { GrpcService } from './grpc.service';
|
||||
export class AdminService {
|
||||
constructor(private readonly grpcService: GrpcService) { }
|
||||
|
||||
|
||||
public getSupportedLanguages(): Promise<GetSupportedLanguagesResponse.AsObject> {
|
||||
const req = new GetSupportedLanguagesRequest();
|
||||
return this.grpcService.admin.getSupportedLanguages(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getDefaultLoginTexts(req: GetDefaultLoginTextsRequest):
|
||||
Promise<GetDefaultLoginTextsResponse.AsObject> {
|
||||
return this.grpcService.admin.getDefaultLoginTexts(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomLoginTexts(req: GetCustomLoginTextsRequest):
|
||||
Promise<GetCustomLoginTextsResponse.AsObject> {
|
||||
return this.grpcService.admin.getCustomLoginTexts(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public setCustomLoginText(req: SetCustomLoginTextsRequest):
|
||||
Promise<SetCustomLoginTextsResponse.AsObject> {
|
||||
return this.grpcService.admin.setCustomLoginText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public resetCustomLoginTextToDefault(lang: string): Promise<ResetCustomLoginTextsToDefaultResponse.AsObject> {
|
||||
const req = new ResetCustomLoginTextsToDefaultRequest();
|
||||
req.setLanguage(lang);
|
||||
return this.grpcService.admin.resetCustomLoginTextToDefault(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
// message texts
|
||||
|
||||
public getDefaultInitMessageText(req: GetDefaultInitMessageTextRequest):
|
||||
Promise<GetDefaultInitMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getDefaultInitMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomInitMessageText(req: GetCustomInitMessageTextRequest):
|
||||
Promise<GetCustomInitMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getCustomInitMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public setDefaultInitMessageText(req: SetDefaultInitMessageTextRequest):
|
||||
Promise<SetDefaultInitMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.setDefaultInitMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
|
||||
public getDefaultVerifyEmailMessageText(req: GetDefaultVerifyEmailMessageTextRequest):
|
||||
Promise<GetDefaultVerifyEmailMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getDefaultVerifyEmailMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomVerifyEmailMessageText(req: GetCustomVerifyEmailMessageTextRequest):
|
||||
Promise<GetCustomVerifyEmailMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getCustomVerifyEmailMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public setDefaultVerifyEmailMessageText(req: SetDefaultVerifyEmailMessageTextRequest):
|
||||
Promise<SetDefaultVerifyEmailMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.setDefaultVerifyEmailMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
|
||||
public getDefaultVerifyPhoneMessageText(req: GetDefaultVerifyPhoneMessageTextRequest):
|
||||
Promise<GetDefaultVerifyPhoneMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getDefaultVerifyPhoneMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomVerifyPhoneMessageText(req: GetCustomVerifyPhoneMessageTextRequest):
|
||||
Promise<GetCustomVerifyPhoneMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getCustomVerifyPhoneMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public setDefaultVerifyPhoneMessageText(req: SetDefaultVerifyPhoneMessageTextRequest):
|
||||
Promise<SetDefaultVerifyPhoneMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.setDefaultVerifyPhoneMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
|
||||
public getDefaultPasswordResetMessageText(req: GetDefaultPasswordResetMessageTextRequest):
|
||||
Promise<GetDefaultPasswordResetMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getDefaultPasswordResetMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomPasswordResetMessageText(req: GetCustomPasswordResetMessageTextRequest):
|
||||
Promise<GetCustomPasswordResetMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getCustomPasswordResetMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public setDefaultPasswordResetMessageText(req: SetDefaultPasswordResetMessageTextRequest):
|
||||
Promise<SetDefaultPasswordResetMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.setDefaultPasswordResetMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
|
||||
public getDefaultDomainClaimedMessageText(req: GetDefaultDomainClaimedMessageTextRequest):
|
||||
Promise<GetDefaultDomainClaimedMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getDefaultDomainClaimedMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomDomainClaimedMessageText(req: GetCustomDomainClaimedMessageTextRequest):
|
||||
Promise<GetCustomDomainClaimedMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getCustomDomainClaimedMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public setDefaultDomainClaimedMessageText(req: SetDefaultDomainClaimedMessageTextRequest):
|
||||
Promise<SetDefaultDomainClaimedMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.setDefaultDomainClaimedMessageText(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public SetUpOrg(
|
||||
org: SetUpOrgRequest.Org,
|
||||
human: SetUpOrgRequest.Human,
|
||||
@@ -195,6 +347,17 @@ export class AdminService {
|
||||
return this.grpcService.admin.removeFailedEvent(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getPrivacyPolicy():
|
||||
Promise<GetPrivacyPolicyResponse.AsObject> {
|
||||
const req = new GetPrivacyPolicyRequest();
|
||||
return this.grpcService.admin.getPrivacyPolicy(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public updatePrivacyPolicy(req: UpdatePrivacyPolicyRequest):
|
||||
Promise<UpdatePrivacyPolicyResponse.AsObject> {
|
||||
return this.grpcService.admin.updatePrivacyPolicy(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
// Features
|
||||
|
||||
public getOrgFeatures(orgId: string): Promise<GetOrgFeaturesResponse.AsObject> {
|
||||
|
||||
Reference in New Issue
Block a user