]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/web/__init__.py
people: Allow to modify if people want to receive promotional updates
[ipfire.org.git] / src / web / __init__.py
index 2a1b96f01ef7945a6bd9da90323929bcf0489c31..41c3f6cdf466fd03eeb33b829eaa1d1432d562ce 100644 (file)
@@ -74,6 +74,7 @@ class Application(tornado.web.Application):
 
                                # People
                                "AccountsList"         : people.AccountsListModule,
+                               "Agent"                : people.AgentModule,
                                "CDR"                  : people.CDRModule,
                                "Channels"             : people.ChannelsModule,
                                "MOS"                  : people.MOSModule,
@@ -96,6 +97,8 @@ class Application(tornado.web.Application):
                                "WikiList"             : wiki.WikiListModule,
 
                                # Misc
+                               "ChristmasBanner"      : ui_modules.ChristmasBannerModule,
+                               "Markdown"             : ui_modules.MarkdownModule,
                                "Map"                  : ui_modules.MapModule,
                                "ProgressBar"          : ui_modules.ProgressBarModule,
                        },
@@ -137,7 +140,6 @@ class Application(tornado.web.Application):
                        (r"/news/(.*)", handlers.NewsHandler),
 
                        # Static Pages
-                       (r"/chat", StaticHandler, { "template" : "chat.html" }),
                        (r"/features", StaticHandler, { "template" : "features.html" }),
                        (r"/legal", StaticHandler, { "template" : "legal.html" }),
                        (r"/support", StaticHandler, { "template" : "support.html" }),
@@ -250,6 +252,7 @@ class Application(tornado.web.Application):
                # location.ipfire.org
                self.add_handlers(r"location(\.dev)?\.ipfire\.org", [
                        (r"/", location.IndexHandler),
+                       (r"/how\-to\-use", StaticHandler, { "template" : "../location/how-to-use.html" }),
                        (r"/lookup/(.+)/blacklists", location.BlacklistsHandler),
                        (r"/lookup/(.+)", location.LookupHandler),
                ])
@@ -267,22 +270,34 @@ class Application(tornado.web.Application):
                # people.ipfire.org
                self.add_handlers(r"people(\.dev)?\.ipfire\.org", [
                        (r"/", people.IndexHandler),
-                       (r"/activate/(\w+)/(\w+)", auth.ActivateHandler),
+                       (r"/activate/([a-z_][a-z0-9_-]{0,31})/(\w+)", auth.ActivateHandler),
                        (r"/conferences", people.ConferencesHandler),
+                       (r"/groups", people.GroupsHandler),
+                       (r"/groups/(\w+)", people.GroupHandler),
                        (r"/register", auth.RegisterHandler),
                        (r"/search", people.SearchHandler),
                        (r"/users", people.UsersHandler),
-                       (r"/users/(\w+)", people.UserHandler),
-                       (r"/users/(\w+)\.jpg", people.AvatarHandler),
-                       (r"/users/(\w+)/calls/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", people.CallHandler),
-                       (r"/users/(\w+)/calls(?:/(\d{4}-\d{2}-\d{2}))?", people.CallsHandler),
-                       (r"/users/(\w+)/edit", people.UserEditHandler),
-                       (r"/users/(\w+)/passwd", people.UserPasswdHandler),
-                       (r"/users/(\w+)/ssh-keys", people.SSHKeysIndexHandler),
-                       (r"/users/(\w+)/ssh-keys/(SHA256\:.*)/delete", people.SSHKeysDeleteHandler),
-                       (r"/users/(\w+)/ssh-keys/(SHA256\:.*)", people.SSHKeysDownloadHandler),
-                       (r"/users/(\w+)/ssh-keys/upload", people.SSHKeysUploadHandler),
-                       (r"/users/(\w+)/sip", people.SIPHandler),
+                       (r"/users/([a-z_][a-z0-9_-]{0,31})", people.UserHandler),
+                       (r"/users/([a-z_][a-z0-9_-]{0,31})\.jpg", people.AvatarHandler),
+                       (r"/users/([a-z_][a-z0-9_-]{0,31})/calls/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", people.CallHandler),
+                       (r"/users/([a-z_][a-z0-9_-]{0,31})/calls(?:/(\d{4}-\d{2}-\d{2}))?", people.CallsHandler),
+                       (r"/users/([a-z_][a-z0-9_-]{0,31})/edit", people.UserEditHandler),
+                       (r"/users/([a-z_][a-z0-9_-]{0,31})/passwd", people.UserPasswdHandler),
+                       (r"/users/([a-z_][a-z0-9_-]{0,31})/sip", people.SIPHandler),
+
+                       # Promotional Consent Stuff
+                       (r"/subscribe", people.SubscribeHandler),
+                       (r"/unsubscribe", people.UnsubscribeHandler),
+
+                       # Single-Sign-On for Discourse
+                       (r"/sso/discourse", people.SSODiscourse),
+
+                       # Password Reset
+                       (r"/password\-reset", auth.PasswordResetInitiationHandler),
+                       (r"/password\-reset/([a-z_][a-z0-9_-]{0,31})/(\w+)", auth.PasswordResetHandler),
+
+                       # API
+                       (r"/api/check/uid", auth.APICheckUID),
                ]  + authentication_handlers)
 
                # wiki.ipfire.org
@@ -290,9 +305,11 @@ class Application(tornado.web.Application):
                        authentication_handlers + [
 
                        # Actions
+                       (r"((?:[A-Za-z0-9\-_\/]+)?(?:.*)\.(?:\w+))/_delete", wiki.ActionDeleteHandler),
                        (r"([A-Za-z0-9\-_\/]+)?/_edit", wiki.ActionEditHandler),
                        (r"([A-Za-z0-9\-_\/]+)?/_render", wiki.ActionRenderHandler),
                        (r"([A-Za-z0-9\-_\/]+)?/_(watch|unwatch)", wiki.ActionWatchHandler),
+                       (r"/actions/restore", wiki.ActionRestoreHandler),
                        (r"/actions/upload", wiki.ActionUploadHandler),
 
                        # Handlers