Patch #14606 ยป patch_empty_group_id.diff
| app/models/issue.rb (working copy) | ||
|---|---|---|
| 108 | 108 |
when 'all' |
| 109 | 109 |
nil |
| 110 | 110 |
when 'default' |
| 111 |
user_ids = [user.id] + user.groups.map(&:id) |
|
| 111 |
user_ids = [user.id] + user.groups.map(&:id).reject(&:nil?)
|
|
| 112 | 112 |
"(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
|
| 113 | 113 |
when 'own' |
| 114 |
user_ids = [user.id] + user.groups.map(&:id) |
|
| 114 |
user_ids = [user.id] + user.groups.map(&:id).reject(&:nil?)
|
|
| 115 | 115 |
"(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
|
| 116 | 116 |
else |
| 117 | 117 |
'1=0' |