Skip to content

Commit

Permalink
feat: added ALLOWED_EMAILS
Browse files Browse the repository at this point in the history
  • Loading branch information
kemboi22 committed Aug 15, 2024
1 parent 0d6360a commit 8da524d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imageroot/actions/get-configuration/20read
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ import agent

# Prepare return variable
config = {}
if os.path.exists("rally.env"):
data = agent.read_envfile("rally.env")
config["ALLOWED_EMAILS"] = data['ALLOWED_EMAILS']
else:
config["ALLOWED_EMAILS"] = ""

# Read current configuration from the environment file
config["host"] = os.getenv("TRAEFIK_HOST","")
Expand Down
15 changes: 15 additions & 0 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@
$t("settings.enabled")
}}</template>
</cv-toggle>

<cv-text-input
:label="$t('Allowed Emails')"
placeholder="Allowed Emails separate with comma or use *@example.com wildcard syntax"
v-model="ALLOWED_EMAILS"
class="mg-bottom"
:invalid-message="$t(error.ALLOWED_EMAILS)"
:disabled="loading.getConfiguration || loading.configureModule"
ref="ALLOWED_EMAILS"
>
</cv-text-input>
<!-- advanced options -->
<cv-accordion ref="accordion" class="maxwidth mg-bottom">
<cv-accordion-item :open="toggleAccordion[0]">
Expand Down Expand Up @@ -125,6 +136,7 @@ export default {
host: "",
isLetsEncryptEnabled: false,
isHttpToHttpsEnabled: true,
ALLOWED_EMAILS: "",
loading: {
getConfiguration: false,
configureModule: false,
Expand All @@ -135,6 +147,7 @@ export default {
host: "",
lets_encrypt: "",
http2https: "",
ALLOWED_EMAILS: "",
},
};
},
Expand Down Expand Up @@ -202,6 +215,7 @@ export default {
this.host = config.host;
this.isLetsEncryptEnabled = config.lets_encrypt;
this.isHttpToHttpsEnabled = config.http2https;
this.ALLOWED_EMAILS = config.ALLOWED_EMAILS;

this.loading.getConfiguration = false;
this.focusElement("host");
Expand Down Expand Up @@ -271,6 +285,7 @@ export default {
host: this.host,
lets_encrypt: this.isLetsEncryptEnabled,
http2https: this.isHttpToHttpsEnabled,
ALLOWED_EMAILS: this.ALLOWED_EMAILS,
},
extra: {
title: this.$t("settings.instance_configuration", {
Expand Down

0 comments on commit 8da524d

Please sign in to comment.