Project

General

Profile

Defect #9478 ยป redmine-r7655-issue.patch

Igor Zubkov, 2011-10-26 17:50

View differences:

app/models/issue.rb (working copy)
95 95
        nil
96 96
      when 'default'
97 97
        user_ids = [user.id] + user.groups.map(&:id)
98
        "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids}))"
98
        "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(', ')}))"
99 99
      when 'own'
100 100
        user_ids = [user.id] + user.groups.map(&:id)
101
        "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids}))"
101
        "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(', ')}))"
102 102
      else
103 103
        '1=0'
104 104
      end
    (1-1/1)