GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

Commit 1e5ea6e7 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Return only labels that user have access on IssuableFinder#labels

parent 530aae90
......@@ -124,15 +124,12 @@ def filter_by_no_label?
def labels
return @labels if defined?(@labels)
if labels? && !filter_by_no_label?
@labels = Label.where(title: label_names)
if projects
@labels = LabelsFinder.new(current_user, project_ids: projects, title: label_names).execute
@labels =
if labels? && !filter_by_no_label?
LabelsFinder.new(current_user, project_ids: projects, title: label_names).execute
else
Label.none
end
else
@labels = Label.none
end
end
def assignee?
......
......@@ -45,7 +45,7 @@ def project_id
params[:project_id].presence
end
def project_ids
def projects_ids
params[:project_ids].presence
end
......@@ -70,7 +70,7 @@ def projects
@projects = available_projects
@projects = @projects.in_namespace(group_id) if group_id
@projects = @projects.where(id: project_ids) if project_ids
@projects = @projects.where(id: projects_ids) if projects_ids
@projects = @projects.reorder(nil)
@projects
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment