diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-05-02 07:32:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-05-02 07:32:41 +0000 |
commit | 382ca5055a3a28726b5b66cb79856fbeaaaf73e9 (patch) | |
tree | 3b0fab98a69df63a1eaae9e54cf1265f89513c03 /app/models | |
parent | 2d3f3cd9aa45dfa9317b14c9d877243b0f718a63 (diff) | |
download | redmine-382ca5055a3a28726b5b66cb79856fbeaaaf73e9.tar.gz redmine-382ca5055a3a28726b5b66cb79856fbeaaaf73e9.zip |
Field set as read-only still available in the issues list context menu (#16755).
git-svn-id: http://svn.redmine.org/redmine/trunk@13124 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/issue.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 96c2b2197..3a3373ffd 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -483,6 +483,11 @@ class Issue < ActiveRecord::Base end end + # Returns the custom fields that can be edited by the given user + def editable_custom_fields(user=nil) + editable_custom_field_values(user).map(&:custom_field).uniq + end + # Returns the names of attributes that are read-only for user or the current user # For users with multiple roles, the read-only fields are the intersection of # read-only fields of each role |