Code cleanup, use named routes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11068 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-22 10:30:42 +00:00
parent cd437b7e1d
commit bda9b98a56
4 changed files with 12 additions and 11 deletions
+5
View File
@@ -134,6 +134,11 @@ class Issue < ActiveRecord::Base
end
end
# Returns true if user or current user is allowed to edit or add a note to the issue
def editable?(user=User.current)
user.allowed_to?(:edit_issues, project) || user.allowed_to?(:add_issue_notes, project)
end
def initialize(attributes=nil, *args)
super
if new_record?