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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a874e8f0
Commit
a874e8f0
authored
Sep 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
45767fa4
564d78da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
app/services/search/global_service.rb
app/services/search/global_service.rb
+1
-1
changelogs/unreleased/issue-64738.yml
changelogs/unreleased/issue-64738.yml
+5
-0
spec/services/search/global_service_spec.rb
spec/services/search/global_service_spec.rb
+8
-0
No files found.
app/services/search/global_service.rb
View file @
a874e8f0
...
@@ -18,7 +18,7 @@ module Search
...
@@ -18,7 +18,7 @@ module Search
end
end
def
projects
def
projects
@projects
||=
ProjectsFinder
.
new
(
current_user:
current_user
).
execute
@projects
||=
ProjectsFinder
.
new
(
params:
{
non_archived:
true
},
current_user:
current_user
).
execute
end
end
def
allowed_scopes
def
allowed_scopes
...
...
changelogs/unreleased/issue-64738.yml
0 → 100644
View file @
a874e8f0
---
title
:
Prevent archived projects from showing up in global search
merge_request
:
31498
author
:
David Palubin
type
:
fixed
spec/services/search/global_service_spec.rb
View file @
a874e8f0
...
@@ -42,6 +42,14 @@ describe Search::GlobalService do
...
@@ -42,6 +42,14 @@ describe Search::GlobalService do
expect
(
results
.
objects
(
'projects'
)).
to
match_array
[
found_project
]
expect
(
results
.
objects
(
'projects'
)).
to
match_array
[
found_project
]
end
end
it
'does not return archived projects'
do
archived_project
=
create
(
:project
,
:public
,
archived:
true
,
name:
'archived_project'
)
results
=
described_class
.
new
(
user
,
search:
"archived"
).
execute
expect
(
results
.
objects
(
'projects'
)).
not_to
include
(
archived_project
)
end
end
end
end
end
end
end
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