From cd0f291eb1a608589fcc2c1875fa7099ed8e2c51 Mon Sep 17 00:00:00 2001 From: Raphael Kabo Date: Sun, 25 Feb 2024 17:56:25 +0000 Subject: feat: optionally restrict event creation to specific emails --- views/createEventMagicLink.handlebars | 30 ++++++++++++++++++++++ .../createEventMagicLinkHtml.handlebars | 8 ++++++ .../createEventMagicLinkText.handlebars | 11 ++++++++ views/partials/eventForm.handlebars | 5 ++-- views/partials/eventGroupForm.handlebars | 5 ++-- views/partials/importeventform.handlebars | 5 ++-- 6 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 views/createEventMagicLink.handlebars create mode 100644 views/emails/createEventMagicLink/createEventMagicLinkHtml.handlebars create mode 100644 views/emails/createEventMagicLink/createEventMagicLinkText.handlebars (limited to 'views') diff --git a/views/createEventMagicLink.handlebars b/views/createEventMagicLink.handlebars new file mode 100644 index 0000000..563af82 --- /dev/null +++ b/views/createEventMagicLink.handlebars @@ -0,0 +1,30 @@ +
+ +

Request a link to create a new event

+ +
+

+ The administrator of this instance has limited event creation to a set of specific email addresses. If your email address is allowed to create events, you will be sent a magic link to create an event. If not, you won't receive anything. +

+

+ If you run into any issues, please contact the instance administrator. +

+ {{#if message}} + + {{/if}} +
+ + +
+
+ +
+
+
diff --git a/views/emails/createEventMagicLink/createEventMagicLinkHtml.handlebars b/views/emails/createEventMagicLink/createEventMagicLinkHtml.handlebars new file mode 100644 index 0000000..1379607 --- /dev/null +++ b/views/emails/createEventMagicLink/createEventMagicLinkHtml.handlebars @@ -0,0 +1,8 @@ +

Here's a magic link which will allow you to create an event on {{siteName}}.

+

This link will expire in 24 hours and can be used multiple times before then. Don't share it publicly, because it will allow anyone to create an event on your behalf!

+

https://{{domain}}/new/{{token}}

+

Love,

+

{{siteName}}

+
+

Hold up - I have no idea what this email is about!

+

If you didn't try to create an event on {{siteName}}, someone may have accidentally typed your email instead of theirs. Don't worry - there isn't anything you need to do. Your email address will be deleted after the magic link expires.

diff --git a/views/emails/createEventMagicLink/createEventMagicLinkText.handlebars b/views/emails/createEventMagicLink/createEventMagicLinkText.handlebars new file mode 100644 index 0000000..e3b4f96 --- /dev/null +++ b/views/emails/createEventMagicLink/createEventMagicLinkText.handlebars @@ -0,0 +1,11 @@ +Here's a magic link which will allow you to create an event on {{siteName}}. + +This link will expire in 24 hours and can be used multiple times before then. Don't share it publicly, because it will allow anyone to create an event on your behalf! + +https://{{domain}}/new/{{token}} + +Love, + +{{siteName}} + +If you didn't try to create an event on {{siteName}}, someone may have accidentally typed your email instead of theirs. Don't worry - there isn't anything you need to do. Your email address will be deleted after the magic link expires. diff --git a/views/partials/eventForm.handlebars b/views/partials/eventForm.handlebars index c44a2ef..c2eebc3 100755 --- a/views/partials/eventForm.handlebars +++ b/views/partials/eventForm.handlebars @@ -1,3 +1,4 @@ +
@@ -65,7 +66,7 @@
- + If you provide your email, we will send your secret editing password here, and use it to notify you of updates to the event.
@@ -159,7 +160,7 @@

Please fix these errors:

diff --git a/views/partials/eventGroupForm.handlebars b/views/partials/eventGroupForm.handlebars index e020f4a..258c321 100644 --- a/views/partials/eventGroupForm.handlebars +++ b/views/partials/eventGroupForm.handlebars @@ -1,3 +1,4 @@ +
@@ -18,7 +19,7 @@
- + If you provide your email, we will send your secret editing password here, and use it to notify you of updates to the event.
@@ -40,7 +41,7 @@

Please fix these errors:

diff --git a/views/partials/importeventform.handlebars b/views/partials/importeventform.handlebars index d62b599..ac3c673 100644 --- a/views/partials/importeventform.handlebars +++ b/views/partials/importeventform.handlebars @@ -6,6 +6,7 @@ Image showing the location of the export option on Facebook
+
@@ -17,7 +18,7 @@
- + If you provide your email, we will send your secret editing password here, and use it to notify you of updates to the event.
@@ -31,7 +32,7 @@

Please fix these errors:

-- cgit v1.2.3