feat: e-mail templates (#1158)

* View definition added

* Get templates and texts from the database.

* Fill in texts in templates

* Fill in texts in templates

* Client API added

* Weekly backup

* Weekly backup

* Daily backup

* Weekly backup

* Tests added

* Corrections from merge branch

* Fixes from pull request review
This commit is contained in:
Michael Waeger
2021-01-18 14:17:22 +01:00
committed by GitHub
parent e7540e5e05
commit f2a32871a7
88 changed files with 5325 additions and 155 deletions

View File

@@ -349,6 +349,48 @@ service AdminService {
};
}
rpc GetDefaultMailTemplate(google.protobuf.Empty) returns (DefaultMailTemplateView) {
option (google.api.http) = {
get: "/policies/mailtemplate"
};
option (caos.zitadel.utils.v1.auth_option) = {
permission: "iam.policy.read"
};
}
rpc UpdateDefaultMailTemplate(DefaultMailTemplateUpdate) returns (DefaultMailTemplate) {
option (google.api.http) = {
put: "/policies/mailtemplate"
body: "*"
};
option (caos.zitadel.utils.v1.auth_option) = {
permission: "iam.policy.write"
};
}
rpc GetDefaultMailTexts(google.protobuf.Empty) returns (DefaultMailTextsView) {
option (google.api.http) = {
get: "/policies/mailtexts"
};
option (caos.zitadel.utils.v1.auth_option) = {
permission: "iam.policy.read"
};
}
rpc UpdateDefaultMailText(DefaultMailTextUpdate) returns (DefaultMailText) {
option (google.api.http) = {
put: "/policies/mailtext"
body: "*"
};
option (caos.zitadel.utils.v1.auth_option) = {
permission: "iam.policy.write"
};
}
rpc GetDefaultLoginPolicy(google.protobuf.Empty) returns (DefaultLoginPolicyView) {
option (google.api.http) = {
get: "/policies/login"
@@ -992,6 +1034,63 @@ message DefaultLabelPolicyView {
google.protobuf.Timestamp change_date = 4;
}
message DefaultMailTemplate {
bytes template = 1;
google.protobuf.Timestamp creation_date = 2;
google.protobuf.Timestamp change_date = 3;
}
message DefaultMailTemplateUpdate {
bytes template = 1;
}
message DefaultMailTemplateView {
bytes template = 1;
google.protobuf.Timestamp creation_date = 2;
google.protobuf.Timestamp change_date = 3;
}
message DefaultMailText {
string mail_text_type = 1;
string language = 2;
string title = 3;
string pre_header = 4;
string subject = 5;
string greeting = 6;
string text = 7;
string button_text = 8;
google.protobuf.Timestamp creation_date = 9;
google.protobuf.Timestamp change_date = 10;
}
message DefaultMailTextUpdate {
string mail_text_type = 1;
string language = 2;
string title = 3;
string pre_header = 4;
string subject = 5;
string greeting = 6;
string text = 7;
string button_text = 8;
}
message DefaultMailTextsView{
repeated DefaultMailTextView texts = 1;
}
message DefaultMailTextView {
string mail_text_type = 1;
string language = 2;
string title = 3;
string pre_header = 4;
string subject = 5;
string greeting = 6;
string text = 7;
string button_text = 8;
google.protobuf.Timestamp creation_date = 9;
google.protobuf.Timestamp change_date = 10;
}
message DefaultLoginPolicy {
bool allow_username_password = 1;
bool allow_register = 2;