OSDN Git Service
(root)
/
redminele
/
redmine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b44317b
)
Adds missing scope for r2595.
author
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Tue, 17 Mar 2009 17:30:14 +0000
(17:30 +0000)
committer
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Tue, 17 Mar 2009 17:30:14 +0000
(17:30 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2596
e93f8b46
-1217-0410-a6f0-
8f06a7374b81
app/models/issue.rb
patch
|
blob
|
history
diff --git
a/app/models/issue.rb
b/app/models/issue.rb
index
3a278a7
..
4e2a3c6
100644
(file)
--- a/
app/models/issue.rb
+++ b/
app/models/issue.rb
@@
-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)