Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-07-13 17:38:21 +0300
committerSean McGivern <sean@gitlab.com>2016-07-27 16:10:49 +0300
commitdc4de2d8e2a42640cc24816fd28112c2f2d0bc91 (patch)
tree31b0b71bbf9cc0130fb3f7577af3d6fc9df8c152 /app/assets
parentaed644ccc084223cb1f9c5d955569c5ff9eeaf88 (diff)
Allow skipping users in autocomplete
Pass an array of user IDs in the `skip_users` param to have them excluded from the results (unless they are explicitly included through the `current_user` or `author_id` params).
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/users_select.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/users_select.js b/app/assets/javascripts/users_select.js
index 64a29d36cdf..4af2a214e12 100644
--- a/app/assets/javascripts/users_select.js
+++ b/app/assets/javascripts/users_select.js
@@ -189,6 +189,7 @@
_this.groupId = $(select).data('group-id');
_this.showCurrentUser = $(select).data('current-user');
_this.authorId = $(select).data('author-id');
+ _this.skipUsers = $(select).data('skip-users');
showNullUser = $(select).data('null-user');
showAnyUser = $(select).data('any-user');
showEmailUser = $(select).data('email-user');
@@ -320,7 +321,8 @@
project_id: this.projectId,
group_id: this.groupId,
current_user: this.showCurrentUser,
- author_id: this.authorId
+ author_id: this.authorId,
+ skip_users: this.skipUsers
},
dataType: "json"
}).done(function(users) {