Mercurial > hg > soundsoftware-site
diff app/models/wiki.rb @ 929:5f33065ddc4b redmine-1.3
Update to Redmine SVN rev 9414 on 1.3-stable branch
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 14:54:18 +0100 |
parents | cbb26bc654de |
children | ec1c49528f36 433d4f72a19b |
line wrap: on
line diff
--- a/app/models/wiki.rb Fri Feb 24 19:09:32 2012 +0000 +++ b/app/models/wiki.rb Wed Jun 27 14:54:18 2012 +0100 @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class Wiki < ActiveRecord::Base + include Redmine::SafeAttributes belongs_to :project has_many :pages, :class_name => 'WikiPage', :dependent => :destroy, :order => 'title' has_many :redirects, :class_name => 'WikiRedirect', :dependent => :delete_all @@ -25,6 +26,8 @@ validates_presence_of :start_page validates_format_of :start_page, :with => /^[^,\.\/\?\;\|\:]*$/ + safe_attributes 'start_page' + def visible?(user=User.current) !user.nil? && user.allowed_to?(:view_wiki_pages, project) end