Commit 69164247 authored by Lukas 'Eipi' Eipert's avatar Lukas 'Eipi' Eipert Committed by Clement Ho

Exclude forks from Group Security Dashboard filter

Per default GitLab includes forks (shared projects) in the Groups
Project API. With `with_shared=false` we exclude those from the API
calls.
parent 3921e1d2
......@@ -10,6 +10,7 @@ const getAllProjects = (url, page = '1', projects = []) =>
page,
include_subgroups: true,
with_security_reports: true,
with_shared: false,
order_by: 'path',
sort: 'asc',
},
......
---
title: Exclude forks from Group Security Dashboard filter
merge_request: 14667
author:
type: fixed
......@@ -27,8 +27,20 @@ describe('projects actions', () => {
});
describe('on success', () => {
const expectedParams = {
include_subgroups: true,
with_security_reports: true,
with_shared: false,
};
beforeEach(() => {
mock.onGet(state.projectsEndpoint).replyOnce(200, data);
mock.onGet(state.projectsEndpoint).replyOnce(config => {
const hasExpectedParams = Object.keys(expectedParams).every(
param => config.params[param] === expectedParams[param],
);
return hasExpectedParams ? [200, data] : [400];
});
});
it('should dispatch the request and success actions', done => {
......
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