Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-06-10 17:26:47 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-06-14 01:32:00 +0300
commit149176758393c8d89d996c62c11511b3e86b3f8d (patch)
tree6e1a0cdc99e36278735db9beddb6899fb9aa64fe /app/models/issue.rb
parentb56c45675019baaaf47615d51c08d5caa0734ad3 (diff)
Use Issue.visible_to_user in Notes.search to avoid query duplication
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 6ecb3535359..1bdf9c011b2 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -51,7 +51,7 @@ class Issue < ActiveRecord::Base
end
def self.visible_to_user(user)
- return where(confidential: false) if user.blank?
+ return where('issues.confidential IS NULL OR issues.confidential IS FALSE') if user.blank?
return all if user.admin?
where('