mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 04:25:31 +02:00
Fixed that 'My page' blocks may display issues that the user is no longer allowed to view (#2590).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2322 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -51,6 +51,9 @@ class Issue < ActiveRecord::Base
|
||||
validates_inclusion_of :done_ratio, :in => 0..100
|
||||
validates_numericality_of :estimated_hours, :allow_nil => true
|
||||
|
||||
named_scope :visible, lambda {|*args| { :include => :project,
|
||||
:conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } }
|
||||
|
||||
def after_initialize
|
||||
if new_record?
|
||||
# set default values for new records only
|
||||
|
||||
Reference in New Issue
Block a user