X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Fweb%2F__init__.py;h=41c3f6cdf466fd03eeb33b829eaa1d1432d562ce;hb=92c4b559f361801e697abb0a29744043f443fcdc;hp=d5e7022faa59cf12c149155ec2049723141374c8;hpb=9db2e89f0b577dc03790607a4529a3136d3ef10e;p=ipfire.org.git diff --git a/src/web/__init__.py b/src/web/__init__.py index d5e7022f..41c3f6cd 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -74,9 +74,11 @@ class Application(tornado.web.Application): # People "AccountsList" : people.AccountsListModule, + "Agent" : people.AgentModule, "CDR" : people.CDRModule, "Channels" : people.ChannelsModule, "MOS" : people.MOSModule, + "NewAccounts" : people.NewAccountsModule, "Password" : people.PasswordModule, "Registrations" : people.RegistrationsModule, "SIPStatus" : people.SIPStatusModule, @@ -95,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, }, @@ -136,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" }), @@ -249,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), ]) @@ -266,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 @@ -289,8 +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 @@ -299,7 +318,7 @@ class Application(tornado.web.Application): (r"/watchlist", wiki.WatchlistHandler), # Media - (r"([A-Za-z0-9\-_\/]+)?/files", wiki.FilesHandler), + (r"([A-Za-z0-9\-_\/]+)?/_files", wiki.FilesHandler), (r"((?!/static)(?:[A-Za-z0-9\-_\/]+)?(?:.*)\.(?:\w+))$", wiki.FileHandler), # Render pages