From c0605f0b784e6425efd251eccb98c08a6d5f334f Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sun, 3 Apr 2005 04:22:46 +0000 Subject: [PATCH] Disabled file uploads in preparation to release 0.10 --- CHANGELOG | 20 ++++++++++---------- app/controllers/file_controller.rb | 14 +++++++++++++- app/views/admin/edit_web.rhtml | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9ddc7c30..8a4e411a 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,18 +1,18 @@ -HEAD: - RSS feeds accept query parameters, sush as - http://localhost:2500/wiki/rss_with_headlines?start=2005-02-18&end=2005-02-19&limit=10 - RedCloth 3.0.3 (mixing Textile and Markdown in the same page) - Files/pictures can be uploaded to a wiki and served from / displayed in wiki pages - Wiki link syntax doesn't conflict with Textile hyperlink syntax. Therefore - "textile link":LinkToSomePlace will not look insane. + * 0.10.0: + Ported to ActionPack + RedCloth 3.0.3 (mixing Textile and Markdown on the same page) Instiki can serve static content (such as HTML or plain-text files) from ./public directory - Wiki search handles multibyte (UTF-8) characters correctly - Ported to ActionPack + Much friendlier admin interface + Wiki link syntax doesn't conflict with Textile hyperlink syntax. Therefore + "textile link":LinkToSomePlace will not look insane. + RSS feeds accept query parameters, sush as + http://localhost:2500/wiki/rss_with_headlines?start=2005-02-18&end=2005-02-19&limit=10 Madeleine will check every hour if there are new commands in the log or 24 hours have passed since last snapshot, and take snapshot if either of these conditions is true Madeleine will also not log read-only operations, resulting in a better performance Wiki extracts (to HTML and plain text) will leave only the last extract file in ./storage + Wiki search handles multibyte (UTF-8) characters correctly Local hyperlinks in published pages point to published pages [Michael DeHaan] Fixed a bug that sometimes caused all past revisions of a page to be "forgotten" on restart @@ -23,7 +23,7 @@ HEAD: Automated tests for all controller actions category: lines are presented as links to "All Pages" for relevant categories Search looks at page titles, as well as content - Various other usability enhancements and bug fixes + Multiple other usability enhancements and bug fixes * 0.9.2: Rollback takes the user to an edit form. The form has to be submitted for the change to diff --git a/app/controllers/file_controller.rb b/app/controllers/file_controller.rb index 808322ed..05e87329 100644 --- a/app/controllers/file_controller.rb +++ b/app/controllers/file_controller.rb @@ -2,6 +2,9 @@ require 'fileutils' require 'application' require 'instiki_errors' +# Controller that is responsible for serving files and pictures. +# Disabled in version 0.10 + class FileController < ApplicationController layout 'default' @@ -45,6 +48,8 @@ class FileController < ApplicationController end def import + return if file_uploads_disabled? + check_authorization if @params['file'] @problems = [] @@ -64,8 +69,15 @@ class FileController < ApplicationController end protected - + def check_allow_uploads + + # TODO enable file uploads again after 0.10 release + unless RAILS_ENV == 'test' + render_text 'File uploads are not ready for general use in Instiki 0.10', '403 Forbidden' + return false + end + unless @web.allow_uploads render_text 'File uploads are blocked by the webmaster', '403 Forbidden' return false diff --git a/app/views/admin/edit_web.rhtml b/app/views/admin/edit_web.rhtml index d8dc3c0d..922efc7e 100644 --- a/app/views/admin/edit_web.rhtml +++ b/app/views/admin/edit_web.rhtml @@ -46,6 +46,10 @@ /> Count pages
+