summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-09-23 13:34:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-09-23 13:34:24 +0000
commite978d480cd2fe774d9e34c266b6e09ad93291d39 (patch)
tree00a48102150a9e60806270be3b420e204a52e06b /app/models/custom_field.rb
parent17265ecc1c710a523708f41ff486f2b0b6e00900 (diff)
downloadredmine-e978d480cd2fe774d9e34c266b6e09ad93291d39.tar.gz
redmine-e978d480cd2fe774d9e34c266b6e09ad93291d39.zip
Remove unused and broken method CustomField.visibility_condition (#29160).
Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@17507 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r--app/models/custom_field.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index 58911b5f7..008ef49f9 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -224,19 +224,6 @@ class CustomField < ActiveRecord::Base
end
end
- def self.visibility_condition
- if user.admin?
- "1=1"
- elsif user.anonymous?
- "#{table_name}.visible"
- else
- "#{project_key} IN (SELECT DISTINCT m.project_id FROM #{Member.table_name} m" +
- " INNER JOIN #{MemberRole.table_name} mr ON mr.member_id = m.id" +
- " INNER JOIN #{table_name_prefix}custom_fields_roles#{table_name_suffix} cfr ON cfr.role_id = mr.role_id" +
- " WHERE m.user_id = #{user.id} AND cfr.custom_field_id = #{id})"
- end
- end
-
def <=>(field)
position <=> field.position
end