diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/finders/issuable_finder.rb | 1 | ||||
-rw-r--r-- | app/finders/issues_finder.rb | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 17e9b59b355..1f98ecf95ca 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -363,6 +363,7 @@ class IssuableFinder def use_cte_for_search? return false unless search return false unless Gitlab::Database.postgresql? + return false unless Feature.enabled?(:use_cte_for_group_issues_search, default_enabled: true) params[:use_cte_for_search] end diff --git a/app/finders/issues_finder.rb b/app/finders/issues_finder.rb index 770e0bfe1a3..abdc47b9866 100644 --- a/app/finders/issues_finder.rb +++ b/app/finders/issues_finder.rb @@ -120,9 +120,13 @@ class IssuesFinder < IssuableFinder return @user_can_see_all_confidential_issues = true if current_user.full_private_access? @user_can_see_all_confidential_issues = - project? && - project && - project.team.max_member_access(current_user.id) >= CONFIDENTIAL_ACCESS_LEVEL + if project? && project + project.team.max_member_access(current_user.id) >= CONFIDENTIAL_ACCESS_LEVEL + elsif group + group.max_member_access_for_user(current_user) >= CONFIDENTIAL_ACCESS_LEVEL + else + false + end end def user_cannot_see_confidential_issues? |