Wiki links for news and forums (#9600).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7840 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-11-19 11:16:23 +00:00
parent 1bf492c30e
commit 9ac86d4f4e
3 changed files with 35 additions and 2 deletions
+3
View File
@@ -27,6 +27,9 @@ class Board < ActiveRecord::Base
validates_length_of :name, :maximum => 30
validates_length_of :description, :maximum => 255
named_scope :visible, lambda {|*args| { :include => :project,
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_messages, *args) } }
def visible?(user=User.current)
!user.nil? && user.allowed_to?(:view_messages, project)
end