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
b00fd68a
Commit
b00fd68a
authored
Apr 06, 2021
by
Jonas Wälter
Committed by
Heinrich Lee Yu
Apr 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix visibility filter on explore projects
parent
5c81bbee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
app/finders/projects_finder.rb
app/finders/projects_finder.rb
+1
-1
changelogs/unreleased/fix-explore-projects-by-visibility.yml
changelogs/unreleased/fix-explore-projects-by-visibility.yml
+5
-0
spec/finders/projects_finder_spec.rb
spec/finders/projects_finder_spec.rb
+6
-0
No files found.
app/finders/projects_finder.rb
View file @
b00fd68a
...
...
@@ -131,7 +131,7 @@ class ProjectsFinder < UnionFinder
public_visibility_levels
=
Gitlab
::
VisibilityLevel
.
levels_for_user
(
current_user
)
!
public_visibility_levels
.
include?
(
params
[
:visibility_level
])
!
public_visibility_levels
.
include?
(
params
[
:visibility_level
]
.
to_i
)
end
def
owned_projects?
...
...
changelogs/unreleased/fix-explore-projects-by-visibility.yml
0 → 100644
View file @
b00fd68a
---
title
:
Fix visibility filter on explore projects page
merge_request
:
58293
author
:
Jonas Wälter @wwwjon
type
:
fixed
spec/finders/projects_finder_spec.rb
View file @
b00fd68a
...
...
@@ -129,6 +129,12 @@ RSpec.describe ProjectsFinder do
it
{
is_expected
.
to
eq
([
public_project
])
}
end
context
'as string'
do
let
(
:params
)
{
{
visibility_level:
Gitlab
::
VisibilityLevel
::
INTERNAL
.
to_s
}
}
it
{
is_expected
.
to
eq
([
internal_project
])
}
end
end
describe
'filter by tags'
do
...
...
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