mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-15 18:25:13 +00:00
feat: add notification policy and password change message (#5065)
Implementation of new notification policy with functionality to send email when a password is changed
This commit is contained in:
@@ -204,6 +204,18 @@ import {
|
||||
GetSecurityPolicyResponse,
|
||||
SetSecurityPolicyRequest,
|
||||
SetSecurityPolicyResponse,
|
||||
GetNotificationPolicyRequest,
|
||||
GetNotificationPolicyResponse,
|
||||
UpdateNotificationPolicyRequest,
|
||||
UpdateNotificationPolicyResponse,
|
||||
GetDefaultPasswordChangeMessageTextResponse,
|
||||
GetDefaultPasswordChangeMessageTextRequest,
|
||||
GetCustomPasswordChangeMessageTextResponse,
|
||||
SetDefaultPasswordChangeMessageTextRequest,
|
||||
SetDefaultPasswordChangeMessageTextResponse,
|
||||
GetCustomPasswordChangeMessageTextRequest,
|
||||
AddNotificationPolicyRequest,
|
||||
AddNotificationPolicyResponse,
|
||||
} from '../proto/generated/zitadel/admin_pb';
|
||||
import { SearchQuery } from '../proto/generated/zitadel/member_pb';
|
||||
import { ListQuery } from '../proto/generated/zitadel/object_pb';
|
||||
@@ -346,6 +358,24 @@ export class AdminService {
|
||||
return this.grpcService.admin.setDefaultPasswordlessRegistrationMessageText(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getDefaultPasswordChangeMessageText(
|
||||
req: GetDefaultPasswordChangeMessageTextRequest,
|
||||
): Promise<GetDefaultPasswordChangeMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getDefaultPasswordChangeMessageText(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getCustomPasswordChangeMessageText(
|
||||
req: GetCustomPasswordChangeMessageTextRequest,
|
||||
): Promise<GetCustomPasswordChangeMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.getCustomPasswordChangeMessageText(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public setDefaultPasswordChangeMessageText(
|
||||
req: SetDefaultPasswordChangeMessageTextRequest,
|
||||
): Promise<SetDefaultPasswordChangeMessageTextResponse.AsObject> {
|
||||
return this.grpcService.admin.setDefaultPasswordChangeMessageText(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public SetUpOrg(org: SetUpOrgRequest.Org, human: SetUpOrgRequest.Human): Promise<SetUpOrgResponse.AsObject> {
|
||||
const req = new SetUpOrgRequest();
|
||||
|
||||
@@ -484,6 +514,21 @@ export class AdminService {
|
||||
return this.grpcService.admin.setDefaultLanguage(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
/* notification policy */
|
||||
|
||||
public getNotificationPolicy(): Promise<GetNotificationPolicyResponse.AsObject> {
|
||||
const req = new GetNotificationPolicyRequest();
|
||||
return this.grpcService.admin.getNotificationPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateNotificationPolicy(req: UpdateNotificationPolicyRequest): Promise<UpdateNotificationPolicyResponse.AsObject> {
|
||||
return this.grpcService.admin.updateNotificationPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public addNotificationPolicy(req: AddNotificationPolicyRequest): Promise<AddNotificationPolicyResponse.AsObject> {
|
||||
return this.grpcService.admin.addNotificationPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
/* security policy */
|
||||
|
||||
public getSecurityPolicy(): Promise<GetSecurityPolicyResponse.AsObject> {
|
||||
|
||||
Reference in New Issue
Block a user