This is an automated email from the ASF dual-hosted git repository.
aicam pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new ddf5e5d68d feat: change project name in email to be configurable
(#4373)
ddf5e5d68d is described below
commit ddf5e5d68df9a2d93f50bdd4cf841349cb43985e
Author: Jaeyun Kim <[email protected]>
AuthorDate: Mon Apr 13 13:39:22 2026 -0700
feat: change project name in email to be configurable (#4373)
### What changes were proposed in this PR?
<!--
Please clarify what changes you are proposing. The purpose of this
section
is to outline the changes. Here are some tips for you:
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
3. If it is a refactoring, clarify what has been changed.
3. It would be helpful to include a before-and-after comparison using
screenshots or GIFs.
4. Please consider writing useful notes for better and faster reviews.
-->
Per request, this PR introduces a new change to the email template where
the project name is made configurable. Previously the project name for
all emails would be "Texera". In order to comply with various needs in
future, we changed the project name to be configurable from
`user-system.conf` so that different organizations and institutions can
be sending automatic emails under their own project name.
### Previous Email Template
<img width="400" height="200" alt="image"
src="https://github.com/user-attachments/assets/c955a051-096b-4868-87a8-c3575d7b61d2"
/>
<img width="450" height="320" alt="image"
src="https://github.com/user-attachments/assets/631e4ddc-7095-437a-88da-20edcb33d945"
/>
### Proposed Email Template
<img width="400" height="200" alt="image"
src="https://github.com/user-attachments/assets/b67fbbc3-cc03-48e5-a1c9-a4dc03916ee6"
/>
<img width="450" height="320" alt="image"
src="https://github.com/user-attachments/assets/cceb7a14-e016-4ddc-8a5a-e7c9fc959b52"
/>
### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned
already.
1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves
#1234`
or `Closes #1234`. If it is only related, simply mention the issue
number.
2. If there is design documentation, please add the link.
3. If there is a discussion in the mailing list, please add the link.
-->
Closes #4318.
### How was this PR tested?
<!--
If tests were added, say they were added here. Or simply mention that if
the PR
is tested with existing test cases. Make sure to include/update test
cases that
check the changes thoroughly including negative and positive cases if
possible.
If it was tested in a way different from regular unit tests, please
clarify how
you tested step by step, ideally copy and paste-able, so that other
reviewers can
test and check, and descendants can verify in the future. If tests were
not added,
please describe why they were not added and/or why it was difficult to
add.
-->
Manually Tested.
### Was this PR authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this
PR,
please include the phrase: 'Generated-by: ' followed by the name of the
tool
and its version. If no, write 'No'.
Please refer to the [ASF Generative Tooling
Guidance](https://www.apache.org/legal/generative-tooling.html) for
details.
-->
No.
---
.../main/scala/org/apache/texera/web/resource/EmailTemplate.scala | 7 +++++--
common/config/src/main/resources/user-system.conf | 3 +++
.../src/main/scala/org/apache/texera/config/UserSystemConfig.scala | 1 +
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git
a/amber/src/main/scala/org/apache/texera/web/resource/EmailTemplate.scala
b/amber/src/main/scala/org/apache/texera/web/resource/EmailTemplate.scala
index 1b7517b4cd..d43ca1e507 100644
--- a/amber/src/main/scala/org/apache/texera/web/resource/EmailTemplate.scala
+++ b/amber/src/main/scala/org/apache/texera/web/resource/EmailTemplate.scala
@@ -31,6 +31,9 @@ object EmailTemplate {
private val deployment: String =
UserSystemConfig.appDomain.map(_.replaceFirst("^https?://",
"")).getOrElse("")
+ private val projectName: String =
+ UserSystemConfig.projectName
+
/**
* Creates an email message for user registration notifications.
* Depending on the 'toAdmin' flag, it either notifies an administrator
@@ -79,7 +82,7 @@ object EmailTemplate {
|We have received your request and it is currently under review.
|You will be notified once your account has been approved.
|
- |Thank you for your interest in Texera!
+ |Thank you for your interest in $projectName!
|""".stripMargin
EmailMessage(subject = subject, content = content, receiver =
receiverEmail)
}
@@ -104,7 +107,7 @@ object EmailTemplate {
|
|If you have any questions, please contact the administrator.
|
- |Thank you for using Texera!
+ |Thank you for using $projectName!
|""".stripMargin
EmailMessage(subject = subject, content = content, receiver =
receiverEmail)
diff --git a/common/config/src/main/resources/user-system.conf
b/common/config/src/main/resources/user-system.conf
index 166ce2fc8f..ffda7e2435 100644
--- a/common/config/src/main/resources/user-system.conf
+++ b/common/config/src/main/resources/user-system.conf
@@ -39,6 +39,9 @@ user-sys {
domain = ""
domain = ${?USER_SYS_DOMAIN}
+ project-name = "Texera"
+ project-name = ${?USER_SYS_PROJECT_NAME}
+
invite-only = false
invite-only = ${?USER_SYS_INVITE_ONLY}
diff --git
a/common/config/src/main/scala/org/apache/texera/config/UserSystemConfig.scala
b/common/config/src/main/scala/org/apache/texera/config/UserSystemConfig.scala
index 81f6b59566..b78eed0202 100644
---
a/common/config/src/main/scala/org/apache/texera/config/UserSystemConfig.scala
+++
b/common/config/src/main/scala/org/apache/texera/config/UserSystemConfig.scala
@@ -33,6 +33,7 @@ object UserSystemConfig {
val gmail: String = conf.getString("user-sys.google.smtp.gmail")
val smtpPassword: String = conf.getString("user-sys.google.smtp.password")
val inviteOnly: Boolean = conf.getBoolean("user-sys.invite-only")
+ val projectName: String = conf.getString("user-sys.project-name")
val workflowVersionCollapseIntervalInMinutes: Int =
conf.getInt("user-sys.version-time-limit-in-minutes")
val appDomain: Option[String] = {