]> source.dussan.org Git - redmine.git/commitdiff
Check visibility for passed user in IssueQuery.default (#37499, #37608).
authorGo MAEDA <maeda@farend.jp>
Fri, 26 Aug 2022 01:19:10 +0000 (01:19 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 26 Aug 2022 01:19:10 +0000 (01:19 +0000)
Patch by  Holger Just.

git-svn-id: https://svn.redmine.org/redmine/trunk@21781 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue_query.rb

index aa8dc9034abe1532bcb6bc3742472cebfaac0b10..205084074f74b23146a0f20d0e6278f0a66adf83 100644 (file)
@@ -81,7 +81,7 @@ class IssueQuery < Query
     # user default
     if user&.logged? && (query_id = user.pref.default_issue_query).present?
       query = find_by(id: query_id)
-      return query if query&.visible?
+      return query if query&.visible?(user)
     end
 
     # project default