Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
adb8b828
Commit
adb8b828
authored
8 years ago
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip authorization check when searching for labels on IssuableFinder
parent
bc7895ff
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+2
-2
app/finders/labels_finder.rb
app/finders/labels_finder.rb
+1
-1
No files found.
app/finders/issuable_finder.rb
View file @
adb8b828
...
@@ -126,7 +126,7 @@ class IssuableFinder
...
@@ -126,7 +126,7 @@ class IssuableFinder
@labels
=
@labels
=
if
labels?
&&
!
filter_by_no_label?
if
labels?
&&
!
filter_by_no_label?
LabelsFinder
.
new
(
current_user
,
project_ids:
projects
,
title:
label_names
).
execute
LabelsFinder
.
new
(
current_user
,
project_ids:
projects
,
title:
label_names
).
execute
(
skip_authorization:
true
)
else
else
Label
.
none
Label
.
none
end
end
...
@@ -273,7 +273,7 @@ class IssuableFinder
...
@@ -273,7 +273,7 @@ class IssuableFinder
items
=
items
.
with_label
(
label_names
,
params
[
:sort
])
items
=
items
.
with_label
(
label_names
,
params
[
:sort
])
if
projects
if
projects
label_ids
=
LabelsFinder
.
new
(
current_user
,
project_ids:
projects
).
execute
.
select
(
:id
)
label_ids
=
LabelsFinder
.
new
(
current_user
,
project_ids:
projects
).
execute
(
skip_authorization:
true
)
.
select
(
:id
)
items
=
items
.
where
(
labels:
{
id:
label_ids
})
items
=
items
.
where
(
labels:
{
id:
label_ids
})
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
app/finders/labels_finder.rb
View file @
adb8b828
...
@@ -22,7 +22,7 @@ class LabelsFinder < UnionFinder
...
@@ -22,7 +22,7 @@ class LabelsFinder < UnionFinder
label_ids
<<
project
.
group
.
labels
if
project
.
group
.
present?
label_ids
<<
project
.
group
.
labels
if
project
.
group
.
present?
label_ids
<<
project
.
labels
label_ids
<<
project
.
labels
else
else
label_ids
<<
Label
.
where
(
group_id:
projects
.
group_ids
.
uniq
)
label_ids
<<
Label
.
where
(
group_id:
projects
.
group_ids
)
label_ids
<<
Label
.
where
(
project_id:
projects
.
select
(
:id
))
label_ids
<<
Label
.
where
(
project_id:
projects
.
select
(
:id
))
end
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment