class ActionEditHandler(auth.CacheMixin, base.BaseHandler):
@tornado.web.authenticated
def get(self, path):
+ if path is None:
+ path = "/"
+
# Check permissions
if not self.backend.wiki.check_acl(path, self.current_user):
raise tornado.web.HTTPError(403, "Access to %s not allowed for %s" % (path, self.current_user))
@tornado.web.authenticated
def post(self, path):
+ if path is None:
+ path = "/"
+
# Check permissions
if not self.backend.wiki.check_acl(path, self.current_user):
raise tornado.web.HTTPError(403, "Access to %s not allowed for %s" % (path, self.current_user))
class ActionWatchHandler(auth.CacheMixin, base.BaseHandler):
@tornado.web.authenticated
def get(self, path, action):
+ if path is None:
+ path = "/"
+
page = self.backend.wiki.get_page(path)
if not page:
raise tornado.web.HTTPError(404, "Page does not exist: %s" % path)
@tornado.web.authenticated
def post(self, path):
+ if path is None:
+ path = "/"
+
content = self.get_argument("content")
# Render the content
class FilesHandler(auth.CacheMixin, base.BaseHandler):
@tornado.web.authenticated
def get(self, path):
+ if path is None:
+ path = "/"
+
# Check permissions
if not self.backend.wiki.check_acl(path, self.current_user):
raise tornado.web.HTTPError(403, "Access to %s not allowed for %s" % (path, self.current_user))
@tornado.web.removeslash
def get(self, path):
+ if path is None:
+ path = "/"
+
# Check permissions
if not self.backend.wiki.check_acl(path, self.current_user):
raise tornado.web.HTTPError(403, "Access to %s not allowed for %s" % (path, self.current_user))