From: Michael Tremer Date: Thu, 27 Jul 2023 10:41:49 +0000 (+0000) Subject: people: Drop remaining handlers and add legacy redirection X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6026905e8882569887818ef47487cb8e649394e;p=ipfire.org.git people: Drop remaining handlers and add legacy redirection Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 3c9f6d03..68d1928b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -292,11 +292,6 @@ templates_nopaste_modules_DATA = \ templates_nopaste_modulesdir = $(templates_nopastedir)/modules -templates_people_DATA = \ - src/templates/people/index.html - -templates_peopledir = $(templatesdir)/people - templates_people_messages_DATA = \ src/templates/people/messages/new-account.txt diff --git a/src/templates/people/index.html b/src/templates/people/index.html deleted file mode 100644 index b0f1b2d6..00000000 --- a/src/templates/people/index.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends "../base.html" %} - -{% block title %}{{ _("Home") }}{% end block %} - -{% block content %} -
-
-
-

{{ _("Hello, %s!") % current_user.first_name }}

- -

- {{ _("Welcome to the IPFire People Portal where you can manage your account and get in touch with others") }} -

-
-
- - {% if not current_user.consents_to_promotional_emails %} -
-
-
-
- -
- -
-
{{ _("You are currently not subscribed to important updates from the IPFire Project") }}
- -

- {{ _("Subscribe to receive notifications about important security updates of IPFire and other news from inside the project") }} -

-
-
- -
- {% raw xsrf_form_html() %} - -
- -
-
-
-
- {% end %} -
-{% end block %} diff --git a/src/web/__init__.py b/src/web/__init__.py index b5c82a90..86aada85 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -24,7 +24,6 @@ from . import fireinfo from . import iuse from . import location from . import nopaste -from . import people from . import ui_modules from . import users from . import voip @@ -337,12 +336,12 @@ class Application(tornado.web.Application): # people.ipfire.org self.add_handlers(r"people\.([a-z]+\.dev\.)?ipfire\.org", [ - (r"/", people.IndexHandler), - (r"/register", auth.RegisterHandler), - - # Serve any static files - (r"/static/(.*)", tornado.web.StaticFileHandler, { "path" : self.settings.get("static_path") }), - ] + authentication_handlers) + (r"/", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users" }), + (r"/register", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/register" }), + (r"/users", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users" }), + (r"/users/([a-z_][a-z0-9_-]{0,31})", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users/{0}" }), + (r"/users/([a-z_][a-z0-9_-]{0,31})\.jpg", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users/{0}.jpg" }), + ]) # wiki.ipfire.org self.add_handlers(r"wiki\.([a-z]+\.dev\.)?ipfire\.org", [ diff --git a/src/web/people.py b/src/web/people.py deleted file mode 100644 index 2d4c2e42..00000000 --- a/src/web/people.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python - -import tornado.web - -from . import base -from . import ui_modules - -class IndexHandler(base.BaseHandler): - @tornado.web.authenticated - def get(self): - self.render("people/index.html")