Commit b00fd68a authored by Jonas Wälter's avatar Jonas Wälter Committed by Heinrich Lee Yu

Fix visibility filter on explore projects

parent 5c81bbee
......@@ -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?
......
---
title: Fix visibility filter on explore projects page
merge_request: 58293
author: Jonas Wälter @wwwjon
type: fixed
......@@ -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
......
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