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:
Diffstat (limited to 'app/finders/issues_finder/params.rb')
-rw-r--r--app/finders/issues_finder/params.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/finders/issues_finder/params.rb b/app/finders/issues_finder/params.rb
index 1de117216f8..2edd8a6f099 100644
--- a/app/finders/issues_finder/params.rb
+++ b/app/finders/issues_finder/params.rb
@@ -32,7 +32,7 @@ class IssuesFinder
if parent
Ability.allowed?(current_user, :read_confidential_issues, parent)
else
- Ability.allowed?(current_user, :read_all_resources)
+ user_can_see_all_issues?
end
end
end
@@ -42,6 +42,12 @@ class IssuesFinder
current_user.blank?
end
+
+ def user_can_see_all_issues?
+ strong_memoize(:user_can_see_all_issues) do
+ Ability.allowed?(current_user, :read_all_resources)
+ end
+ end
end
end