summaryrefslogtreecommitdiff
path: root/app/finders/ci
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /app/finders/ci
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
downloadgitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/finders/ci')
-rw-r--r--app/finders/ci/daily_build_group_report_results_finder.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/app/finders/ci/daily_build_group_report_results_finder.rb b/app/finders/ci/daily_build_group_report_results_finder.rb
index 774f08d1ff2..ec41d9d2c45 100644
--- a/app/finders/ci/daily_build_group_report_results_finder.rb
+++ b/app/finders/ci/daily_build_group_report_results_finder.rb
@@ -14,17 +14,25 @@ module Ci
end
def execute
- return none unless can?(current_user, :read_build_report_results, project)
+ return none unless query_allowed?
+ query
+ end
+
+ protected
+
+ attr_reader :current_user, :project, :ref_path, :start_date, :end_date, :limit
+
+ def query
Ci::DailyBuildGroupReportResult.recent_results(
query_params,
limit: limit
)
end
- private
-
- attr_reader :current_user, :project, :ref_path, :start_date, :end_date, :limit
+ def query_allowed?
+ can?(current_user, :read_build_report_results, project)
+ end
def query_params
{