Skip to content

Commit 7610c97

Browse files
committed
resources/config
1 parent 6db0f28 commit 7610c97

File tree

115 files changed

+2886
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+2886
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
'use strict'
2+
3+
/**
4+
* Returns a partial Email object (minus the `to` and `from` properties),
5+
* suitable for sending with Nodemailer.
6+
*
7+
* Used to send a Delete Account email, upon user request
8+
*
9+
* @param data {Object}
10+
*
11+
* @param data.deleteUrl {string}
12+
* @param data.webId {string}
13+
*
14+
* @return {Object}
15+
*/
16+
function render (data) {
17+
return {
18+
subject: 'Delete Solid-account request',
19+
20+
/**
21+
* Text version
22+
*/
23+
text: `Hi,
24+
25+
We received a request to delete your Solid account, ${data.webId}
26+
27+
To delete your account, click on the following link:
28+
29+
${data.deleteUrl}
30+
31+
If you did not mean to delete your account, ignore this email.`,
32+
33+
/**
34+
* HTML version
35+
*/
36+
html: `<p>Hi,</p>
37+
38+
<p>We received a request to delete your Solid account, ${data.webId}</p>
39+
40+
<p>To delete your account, click on the following link:</p>
41+
42+
<p><a href="${data.deleteUrl}">${data.deleteUrl}</a></p>
43+
44+
<p>If you did not mean to delete your account, ignore this email.</p>
45+
`
46+
}
47+
}
48+
49+
module.exports.render = render
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export function render (data) {
2+
return {
3+
subject: 'Delete Solid-account request',
4+
5+
/**
6+
* Text version
7+
*/
8+
text: `Hi,
9+
10+
We received a request to delete your Solid account, ${data.webId}
11+
12+
To delete your account, click on the following link:
13+
14+
${data.deleteUrl}
15+
16+
If you did not mean to delete your account, ignore this email.`,
17+
18+
/**
19+
* HTML version
20+
*/
21+
html: `<p>Hi,</p>
22+
23+
<p>We received a request to delete your Solid account, ${data.webId}</p>
24+
25+
<p>To delete your account, click on the following link:</p>
26+
27+
<p><a href="${data.deleteUrl}">${data.deleteUrl}</a></p>
28+
29+
<p>If you did not mean to delete your account, ignore this email.</p>`
30+
}
31+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports.render = render
2+
3+
function render (data) {
4+
return {
5+
subject: `Invalid username for account ${data.accountUri}`,
6+
7+
/**
8+
* Text version
9+
*/
10+
text: `Hi,
11+
12+
We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy.
13+
14+
This account has been set to be deleted at ${data.dateOfRemoval}.
15+
16+
${data.supportEmail ? `Please contact ${data.supportEmail} if you want to move your account.` : ''}`,
17+
18+
/**
19+
* HTML version
20+
*/
21+
html: `<p>Hi,</p>
22+
23+
<p>We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy.</p>
24+
25+
<p>This account has been set to be deleted at ${data.dateOfRemoval}.</p>
26+
27+
${data.supportEmail ? `<p>Please contact ${data.supportEmail} if you want to move your account.</p>` : ''}
28+
`
29+
}
30+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
export function render (data) {
2+
return {
3+
subject: `Invalid username for account ${data.accountUri}`,
4+
5+
/**
6+
* Text version
7+
*/
8+
text: `Hi,
9+
10+
We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy.
11+
12+
This account has been set to be deleted at ${data.dateOfRemoval}.
13+
14+
${data.supportEmail ? `Please contact ${data.supportEmail} if you want to move your account.` : ''}`,
15+
16+
/**
17+
* HTML version
18+
*/
19+
html: `<p>Hi,</p>
20+
21+
<p>We're sorry to inform you that the username for account ${data.accountUri} is not allowed after changes to username policy.</p>
22+
23+
<p>This account has been set to be deleted at ${data.dateOfRemoval}.</p>
24+
25+
${data.supportEmail ? `<p>Please contact ${data.supportEmail} if you want to move your account.</p>` : ''}`
26+
}
27+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
'use strict'
2+
3+
/**
4+
* Returns a partial Email object (minus the `to` and `from` properties),
5+
* suitable for sending with Nodemailer.
6+
*
7+
* Used to send a Reset Password email, upon user request
8+
*
9+
* @param data {Object}
10+
*
11+
* @param data.resetUrl {string}
12+
* @param data.webId {string}
13+
*
14+
* @return {Object}
15+
*/
16+
function render (data) {
17+
return {
18+
subject: 'Account password reset',
19+
20+
/**
21+
* Text version
22+
*/
23+
text: `Hi,
24+
25+
We received a request to reset your password for your Solid account, ${data.webId}
26+
27+
To reset your password, click on the following link:
28+
29+
${data.resetUrl}
30+
31+
If you did not mean to reset your password, ignore this email, your password will not change.`,
32+
33+
/**
34+
* HTML version
35+
*/
36+
html: `<p>Hi,</p>
37+
38+
<p>We received a request to reset your password for your Solid account, ${data.webId}</p>
39+
40+
<p>To reset your password, click on the following link:</p>
41+
42+
<p><a href="${data.resetUrl}">${data.resetUrl}</a></p>
43+
44+
<p>If you did not mean to reset your password, ignore this email, your password will not change.</p>
45+
`
46+
}
47+
}
48+
49+
module.exports.render = render
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export function render (data) {
2+
return {
3+
subject: 'Account password reset',
4+
5+
/**
6+
* Text version
7+
*/
8+
text: `Hi,
9+
10+
We received a request to reset your password for your Solid account, ${data.webId}
11+
12+
To reset your password, click on the following link:
13+
14+
${data.resetUrl}
15+
16+
If you did not mean to reset your password, ignore this email, your password will not change.`,
17+
18+
/**
19+
* HTML version
20+
*/
21+
html: `<p>Hi,</p>
22+
23+
<p>We received a request to reset your password for your Solid account, ${data.webId}</p>
24+
25+
<p>To reset your password, click on the following link:</p>
26+
27+
<p><a href="${data.resetUrl}">${data.resetUrl}</a></p>
28+
29+
<p>If you did not mean to reset your password, ignore this email, your password will not change.</p>`
30+
}
31+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
'use strict'
2+
3+
/**
4+
* Returns a partial Email object (minus the `to` and `from` properties),
5+
* suitable for sending with Nodemailer.
6+
*
7+
* Used to send a Welcome email after a new user account has been created.
8+
*
9+
* @param data {Object}
10+
*
11+
* @param data.webid {string}
12+
*
13+
* @return {Object}
14+
*/
15+
function render (data) {
16+
return {
17+
subject: 'Welcome to Solid',
18+
19+
/**
20+
* Text version of the Welcome email
21+
*/
22+
text: `Welcome to Solid!
23+
24+
Your account has been created.
25+
26+
Your Web Id: ${data.webid}`,
27+
28+
/**
29+
* HTML version of the Welcome email
30+
*/
31+
html: `<p>Welcome to Solid!</p>
32+
33+
<p>Your account has been created.</p>
34+
35+
<p>Your Web Id: ${data.webid}</p>`
36+
}
37+
}
38+
39+
module.exports.render = render
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export function render (data) {
2+
return {
3+
subject: 'Welcome to Solid',
4+
5+
/**
6+
* Text version of the Welcome email
7+
*/
8+
text: `Welcome to Solid!
9+
10+
Your account has been created.
11+
12+
Your Web Id: ${data.webid}`,
13+
14+
/**
15+
* HTML version of the Welcome email
16+
*/
17+
html: `<p>Welcome to Solid!</p>
18+
19+
<p>Your account has been created.</p>
20+
21+
<p>Your Web Id: ${data.webid}</p>`
22+
}
23+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Root ACL resource for the user account
2+
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
3+
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
4+
5+
# The homepage is readable by the public
6+
<#public>
7+
a acl:Authorization;
8+
acl:agentClass foaf:Agent;
9+
acl:accessTo </>;
10+
acl:mode acl:Read.
11+
12+
# The owner has full access to every resource in their pod.
13+
# Other agents have no access rights,
14+
# unless specifically authorized in other .acl resources.
15+
<#owner>
16+
a acl:Authorization;
17+
acl:agent <{{webId}}>;
18+
# Optional owner email, to be used for account recovery:
19+
{{#if email}}acl:agent <mailto:{{{email}}}>;{{/if}}
20+
# Set the access to the root storage folder itself
21+
acl:accessTo </>;
22+
# All resources will inherit this authorization, by default
23+
acl:default </>;
24+
# The owner has all of the access modes allowed
25+
acl:mode
26+
acl:Read, acl:Write, acl:Control.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Root Meta resource for the user account
2+
# Used to discover the account's WebID URI, given the account URI
3+
<{{webId}}>
4+
<http://www.w3.org/ns/solid/terms#account>
5+
</>.

0 commit comments

Comments
 (0)