summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2017-04-05 13:58:53 +0000
committerJacob Schatz <jschatz@gitlab.com>2017-04-05 13:58:53 +0000
commit5771ee400f920cda668a182c9f2ad57576f40fb2 (patch)
treebb398b2801fd17b5e6b5e402e6f015a38512dc45
parentd4349ba6c4960f50dce7b0beec5f309894dbada9 (diff)
parenta63f457982c58a1d9a45780607fcd64689e9874a (diff)
downloadgitlab-ce-5771ee400f920cda668a182c9f2ad57576f40fb2.tar.gz
Merge branch 'fix-groups-long-url' into 'master'
Make group skip validation in the frontend Closes #29236 See merge request !10426
-rw-r--r--app/assets/javascripts/groups_select.js4
-rw-r--r--changelogs/unreleased/fix-groups-long-url.yml4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/groups_select.js b/app/assets/javascripts/groups_select.js
index 602a3b78189..10363c16bae 100644
--- a/app/assets/javascripts/groups_select.js
+++ b/app/assets/javascripts/groups_select.js
@@ -45,14 +45,14 @@ window.GroupsSelect = (function() {
page,
per_page: GroupsSelect.PER_PAGE,
all_available,
- skip_groups,
};
},
results: function (data, page) {
if (data.length) return { results: [] };
- const results = data.length ? data : data.results || [];
+ const groups = data.length ? data : data.results || [];
const more = data.pagination ? data.pagination.more : false;
+ const results = groups.filter(group => skip_groups.indexOf(group.id) === -1);
return {
results,
diff --git a/changelogs/unreleased/fix-groups-long-url.yml b/changelogs/unreleased/fix-groups-long-url.yml
new file mode 100644
index 00000000000..f0f1296ad40
--- /dev/null
+++ b/changelogs/unreleased/fix-groups-long-url.yml
@@ -0,0 +1,4 @@
+---
+title: Skip groups validation on the client
+merge_request:
+author: