aboutsummaryrefslogtreecommitdiff
path: root/app/auth
diff options
context:
space:
mode:
Diffstat (limited to 'app/auth')
-rw-r--r--app/auth/forms.py4
-rw-r--r--app/auth/routes.py41
2 files changed, 43 insertions, 2 deletions
diff --git a/app/auth/forms.py b/app/auth/forms.py
index 7758342..ea194a5 100644
--- a/app/auth/forms.py
+++ b/app/auth/forms.py
@@ -3,7 +3,7 @@
from flask import current_app
from flask_wtf import FlaskForm
-from wtforms import StringField, PasswordField, SubmitField
+from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, ValidationError, Email, EqualTo
from app.models import User
@@ -22,6 +22,8 @@ class RegistrationForm(FlaskForm):
password2 = PasswordField(
"Repeat Password", validators=[DataRequired(), EqualTo("password")]
)
+ toc = BooleanField("I agree to the Terms and Conditions.",
+ validators=[DataRequired(), ])
submit = SubmitField("Register")
def validate_username(self, username):
diff --git a/app/auth/routes.py b/app/auth/routes.py
index 2a8a0bd..aa44e7d 100644
--- a/app/auth/routes.py
+++ b/app/auth/routes.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
import datetime
+import markdown
+import textwrap
from flask import (
render_template,
@@ -32,6 +34,41 @@ from app.models import User, Task
from app.utils.tasks import generate_user_task
+LEGAL = markdown.markdown(
+ textwrap.dedent(
+ """
+ ## Terms and Conditions
+
+ The AnnotateChange application is created to construct a data set for
+ the analysis of change point algorithms. As a user, you will be asked
+ to annotate time series data. It is important that we can use these
+ annotations freely and publish them under a permissive license.
+
+ Therefore, we ask that you agree to the following terms and conditions.
+
+ 1. Identifiable user data such as email address, password, and IP
+ address will not be shared by us with any third party, unless we are
+ required to do so by law. This information will only be used to provide
+ authentication to the application and verify that you have access to
+ the email address you provide us.
+
+ 2. Annotations and any other information you provide us through use of
+ the application are provided to us under a worldwide, royalty-free,
+ non-exclusive, and perpetual license and can be made publically
+ available by us under a permissive license and used for whatever
+ purpose we see fit. In any publication of this annotation data users
+ will only be identified by a numeric ID, not by personal identifiable
+ information (such as email or IP address).
+
+ 3. You agree that you will not revoke or seek invalidation of any
+ license that you have granted under these Terms and conditions for any
+ content you have provided us.
+
+ """
+ )
+)
+
+
def auto_logout():
# Automatically logout after a period of inactivity
# https://stackoverflow.com/a/40914886/1154005
@@ -109,7 +146,9 @@ def register():
)
return redirect(url_for("auth.login"))
- return render_template("auth/register.html", title="Register", form=form)
+ return render_template(
+ "auth/register.html", title="Register", form=form, legal=LEGAL
+ )
@bp.route("/reset_password_request", methods=("GET", "POST"))