git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9985 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7f0bb136ad
commit
88e1ae892c
|
@ -420,7 +420,7 @@ class Issue < ActiveRecord::Base
|
||||||
# issue.read_only_attribute_names # => ['due_date', '2']
|
# issue.read_only_attribute_names # => ['due_date', '2']
|
||||||
# issue.read_only_attribute_names(user) # => []
|
# issue.read_only_attribute_names(user) # => []
|
||||||
def read_only_attribute_names(user=nil)
|
def read_only_attribute_names(user=nil)
|
||||||
workflow_rule_by_attribute(user).select {|attr, rule| rule == 'readonly'}.keys
|
workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'readonly'}.keys
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the names of required attributes for user or the current user
|
# Returns the names of required attributes for user or the current user
|
||||||
|
@ -432,7 +432,7 @@ class Issue < ActiveRecord::Base
|
||||||
# issue.required_attribute_names # => ['due_date', '2']
|
# issue.required_attribute_names # => ['due_date', '2']
|
||||||
# issue.required_attribute_names(user) # => []
|
# issue.required_attribute_names(user) # => []
|
||||||
def required_attribute_names(user=nil)
|
def required_attribute_names(user=nil)
|
||||||
workflow_rule_by_attribute(user).select {|attr, rule| rule == 'required'}.keys
|
workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'required'}.keys
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns true if the attribute is required for user
|
# Returns true if the attribute is required for user
|
||||||
|
|
Loading…
Reference in New Issue