REST API for creating/updating wiki pages (#7082).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10717 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-10-25 20:38:29 +00:00
parent 9e31308720
commit eff874b29a
5 changed files with 173 additions and 48 deletions

View File

@@ -57,7 +57,7 @@ class WikiPage < ActiveRecord::Base
# Wiki pages that are protected by default
DEFAULT_PROTECTED_PAGES = %w(sidebar)
safe_attributes 'parent_id',
safe_attributes 'parent_id', 'parent_title',
:if => lambda {|page, user| page.new_record? || user.allowed_to?(:rename_wiki_pages, page.project)}
def initialize(attributes=nil, *args)