to authenticate.
Route('mediagoblin.auth.logout', '/logout/',
controller='mediagoblin.auth.views:logout'),
Route('mediagoblin.auth.verify_email', '/verify_email/',
- controller='mediagoblin.auth.views:verify_email')]
+ controller='mediagoblin.auth.views:verify_email'),
+ Route('mediagoblin.auth.verify_email_notice', '/verification_required/',
+ controller='mediagoblin.auth.views:verify_email_notice')]
{'request': request,
'user': user,
'verification_successful': verification_successful}))
+
+def verify_email_notice(request):
+ """
+ Verify warning view.
+
+ When the user tries to do some action that requires their account
+ to be verified beforehand, this view is called upon!
+ """
+
+ template = request.template_env.get_template(
+ 'mediagoblin/auth/verification_needed.html')
+ return Response(
+ template.render(
+ {'request': request}))
+
# here because an *active* user is required.
return exc.HTTPFound(
location="%s?next=%s" % (
- request.urlgen("mediagoblin.auth.login"),
+ request.urlgen("mediagoblin.auth.verify_email_notice"),
request.path_info))
return controller(request, *args, **kwargs)
--- /dev/null
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 Free Software Foundation, Inc
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#}
+{% extends "mediagoblin/base.html" %}
+
+{% block mediagoblin_content %}
+ <p>
+ Verfication needed!<br />
+ Please check your email to verify your account.
+ </p>
+
+ <p>
+ Still haven't received an email? <a href="#">Click here to resend it.</a>
+ </p>
+{% endblock %}