]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Drop remaining handlers and add legacy redirection
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Jul 2023 10:41:49 +0000 (10:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Jul 2023 10:41:49 +0000 (10:41 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/people/index.html [deleted file]
src/web/__init__.py
src/web/people.py [deleted file]

index 3c9f6d0305d8d05781d2b7b89df7ff81725a72bc..68d1928bde315330e58379cb12ed09a887c358f9 100644 (file)
@@ -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 (file)
index b0f1b2d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Home") }}{% end block %}
-
-{% block content %}
-       <section>
-               <div class="row mb-5">
-                       <div class="col col-lg-6">
-                               <h1>{{ _("Hello, %s!") % current_user.first_name }}</h1>
-
-                               <p>
-                                       {{ _("Welcome to the IPFire People Portal where you can manage your account and get in touch with others") }}
-                               </p>
-                       </div>
-               </div>
-
-               {% if not current_user.consents_to_promotional_emails %}
-                       <div class="card border-primary">
-                               <div class="card-body">
-                                       <div class="row">
-                                               <div class="col-2 d-flex align-items-center justify-content-center">
-                                                       <i class="fas fa-envelope-open-text fa-3x text-primary"></i>
-                                               </div>
-
-                                               <div class="col-10 mb-3">
-                                                       <h6 class="card-title">{{ _("You are currently not subscribed to important updates from the IPFire Project") }}</h6>
-
-                                                       <p class="card-text">
-                                                               {{ _("Subscribe to receive notifications about important security updates of IPFire and other news from inside the project") }}
-                                                       </p>
-                                               </div>
-                                       </div>
-
-                                       <form action="/subscribe" method="POST">
-                                               {% raw xsrf_form_html() %}
-
-                                               <div class="d-grid">
-                                                       <button type="submit" class="btn btn-success">
-                                                               {{ _("Subscribe Now") }}
-                                                       </button>
-                                               </div>
-                                       </form>
-                               </div>
-                       </div>
-               {% end %}
-       </section>
-{% end block %}
index b5c82a9072d21e88cb2fe32156e034e27240962f..86aada8515dbde2523e131f389b579f233fbbb62 100644 (file)
@@ -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 (file)
index 2d4c2e4..0000000
+++ /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")