diff options
Diffstat (limited to 'app/services/todos/destroy/entity_leave_service.rb')
-rw-r--r-- | app/services/todos/destroy/entity_leave_service.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/todos/destroy/entity_leave_service.rb b/app/services/todos/destroy/entity_leave_service.rb index 328a8b39e7b..129e5505a21 100644 --- a/app/services/todos/destroy/entity_leave_service.rb +++ b/app/services/todos/destroy/entity_leave_service.rb @@ -42,7 +42,11 @@ module Todos end def confidential_issues + assigned_ids = IssueAssignee.select(:issue_id).where(user_id: user_id) + Issue.where(project_id: project_ids, confidential: true) + .where('author_id != ?', user_id) + .where('id NOT IN (?)', assigned_ids) end end end |