Commit f0c676d3 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Adds missing scope for r2595.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2596 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b44317b7
......@@ -54,6 +54,8 @@ class Issue < ActiveRecord::Base
named_scope :visible, lambda {|*args| { :include => :project,
:conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } }
named_scope :open, :conditions => ["#{IssueStatus.table_name}.is_closed = ?", false], :include => :status
# Returns true if usr or current user is allowed to view the issue
def visible?(usr=nil)
(usr || User.current).allowed_to?(:view_issues, self.project)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment