Commit 05cb97ec authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix js lint and rubocop violations

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f85f4c60
......@@ -8,7 +8,7 @@ module Elastic
snippets_access_level
wiki_access_level
repository_access_level
)
).freeze
included do
include ApplicationSearch
......
......@@ -81,7 +81,8 @@ module Elastic
should: [
{ term: { author_id: user.id } },
{ terms: { project_id: user.authorized_projects.pluck(:id) } },
{ bool: {
{
bool: {
filter: { terms: { visibility_level: [Snippet::PUBLIC, Snippet::INTERNAL] } },
must_not: { exists: { field: 'project_id' } }
}
......
......@@ -68,4 +68,4 @@ if (process.env.BABEL_ENV === 'coverage') {
});
});
});
}
\ No newline at end of file
}
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