Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
persona
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hexang 息壤平台
persona
Commits
f16f049b
Commit
f16f049b
authored
12 years ago
by
Jed Parsons
Browse files
Options
Downloads
Patches
Plain Diff
Add VerificationURL and RelyingParty to verification email headers
parent
9ca27e00
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/email.js
+9
-5
9 additions, 5 deletions
lib/email.js
with
9 additions
and
5 deletions
lib/email.js
+
9
−
5
View file @
f16f049b
...
...
@@ -30,24 +30,24 @@ if (smtp_params && smtp_params.host) {
const
TEMPLATE_PATH
=
path
.
join
(
__dirname
,
"
static
"
,
"
email_templates
"
);
// the underbar decorator to allow getext to extract strings
// the underbar decorator to allow getext to extract strings
function
_
(
str
)
{
return
str
;
}
// a map of all the different emails we send
const
templates
=
{
"
new
"
:
{
landing
:
'
verify_email_address
'
,
subject
:
_
(
"
Confirm email address for Persona
"
),
subject
:
_
(
"
Confirm email address for Persona
"
),
template
:
fs
.
readFileSync
(
path
.
join
(
TEMPLATE_PATH
,
'
new.ejs
'
)),
},
"
reset
"
:
{
landing
:
'
reset_password
'
,
subject
:
_
(
"
Reset Persona password
"
),
subject
:
_
(
"
Reset Persona password
"
),
template
:
fs
.
readFileSync
(
path
.
join
(
TEMPLATE_PATH
,
'
reset.ejs
'
)),
},
"
confirm
"
:
{
landing
:
'
confirm
'
,
subject
:
_
(
"
Confirm email address for Persona
"
),
subject
:
_
(
"
Confirm email address for Persona
"
),
template
:
fs
.
readFileSync
(
path
.
join
(
TEMPLATE_PATH
,
'
confirm.ejs
'
)),
}
};
...
...
@@ -56,7 +56,7 @@ const templates = {
Object
.
keys
(
templates
).
forEach
(
function
(
type
)
{
templates
[
type
].
template
=
ejs
.
compile
(
templates
[
type
].
template
.
toString
());
});
var
interceptor
=
undefined
;
...
...
@@ -100,6 +100,10 @@ function doSend(email_type, email, site, secret, langContext) {
sender
:
"
Persona <no-reply@persona.org>
"
,
to
:
email
,
subject
:
GETTEXT
(
email_params
.
subject
),
headers
:
{
'
X-BrowserID-VerificationURL
'
:
public_url
,
'
X-BrowserID-RelyingParty
'
:
site
},
body
:
email_params
.
template
({
link
:
public_url
,
site
:
site
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment