From: Vincent Petry Date: Thu, 26 Mar 2015 23:09:35 +0000 (+0100) Subject: Don't append user in a filtered list if groups don't match X-Git-Tag: v8.1.0alpha1~140^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ea93356598894d91968e39615789f934036cf38c;p=nextcloud-server.git Don't append user in a filtered list if groups don't match --- diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 7034972dd15..154003bb840 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -48,6 +48,10 @@ var UserList = { * @returns table row created for this user */ add: function (user, sort) { + if (this.currentGid && _.indexOf(user.groups, this.currentGid) < 0) { + return; + } + var $tr = $userListBody.find('tr:first-child').clone(); // this removes just the `display:none` of the template row $tr.removeAttr('style');