summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 09:07:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 09:07:45 +0000
commitb11f7057d067885619ee3e513751f180b2e8ad85 (patch)
treedfb3077ea8716ed217f5ce4324be4e25a450c599 /lib/api/helpers.rb
parente50050a8756a20b6aa118edbad3369674e4c63ba (diff)
downloadgitlab-ce-b11f7057d067885619ee3e513751f180b2e8ad85.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 2f603dd6bed..be41788ac77 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -505,20 +505,28 @@ module API
protected
- def project_finder_params_ce
- finder_params = { without_deleted: true }
+ def project_finder_params_visibility_ce
+ finder_params = {}
+ finder_params[:min_access_level] = params[:min_access_level] if params[:min_access_level]
+ finder_params[:visibility_level] = Gitlab::VisibilityLevel.level_value(params[:visibility]) if params[:visibility]
finder_params[:owned] = true if params[:owned].present?
finder_params[:non_public] = true if params[:membership].present?
finder_params[:starred] = true if params[:starred].present?
- finder_params[:visibility_level] = Gitlab::VisibilityLevel.level_value(params[:visibility]) if params[:visibility]
finder_params[:archived] = archived_param unless params[:archived].nil?
+ finder_params
+ end
+
+ def project_finder_params_ce
+ finder_params = project_finder_params_visibility_ce
+ finder_params[:without_deleted] = true
finder_params[:search] = params[:search] if params[:search]
finder_params[:search_namespaces] = true if params[:search_namespaces].present?
finder_params[:user] = params.delete(:user) if params[:user]
finder_params[:custom_attributes] = params[:custom_attributes] if params[:custom_attributes]
- finder_params[:min_access_level] = params[:min_access_level] if params[:min_access_level]
finder_params[:id_after] = params[:id_after] if params[:id_after]
finder_params[:id_before] = params[:id_before] if params[:id_before]
+ finder_params[:last_activity_after] = params[:last_activity_after] if params[:last_activity_after]
+ finder_params[:last_activity_before] = params[:last_activity_before] if params[:last_activity_before]
finder_params
end