diff options
author | Go MAEDA <maeda@farend.jp> | 2019-08-24 08:50:17 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-08-24 08:50:17 +0000 |
commit | 22165fd071227de3f893319974d8568b2fb8ebc1 (patch) | |
tree | 0dc44b75d5a530002b5966eebe2c4f4d3fb66b90 /app/models/version_custom_field.rb | |
parent | 880883229f0e48adc20bdada6f00f8754dfa5cc9 (diff) | |
download | redmine-22165fd071227de3f893319974d8568b2fb8ebc1.tar.gz redmine-22165fd071227de3f893319974d8568b2fb8ebc1.zip |
Per role visibility settings for version custom fields (#23997).
Patch by Jens Krämer and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18386 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version_custom_field.rb')
-rw-r--r-- | app/models/version_custom_field.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/version_custom_field.rb b/app/models/version_custom_field.rb index 238649c7c..d9034e06f 100644 --- a/app/models/version_custom_field.rb +++ b/app/models/version_custom_field.rb @@ -21,4 +21,8 @@ class VersionCustomField < CustomField def type_name :label_version_plural end + + def visible_by?(project, user=User.current) + super || (roles & user.roles_for_project(project)).present? + end end |