Commit 513a8b03 authored by jplang's avatar jplang

Remove unused and broken method CustomField.visibility_condition (#29160).

Patch by Holger Just.

git-svn-id: https://svn.redmine.org/redmine/trunk@17507 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 8f918d75
...@@ -224,19 +224,6 @@ class CustomField < ActiveRecord::Base ...@@ -224,19 +224,6 @@ class CustomField < ActiveRecord::Base
end end
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) def <=>(field)
position <=> field.position position <=> field.position
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment