diff options
author | guillaume <guillaume.cassou@orange.fr> | 2019-08-30 17:17:25 +0200 |
---|---|---|
committer | guillaume <guillaume.cassou@orange.fr> | 2019-08-30 17:17:25 +0200 |
commit | 663ba26d4dd0bba8330496a76035b1674031a299 (patch) | |
tree | d18b9495e2286b8e018c0564f26ce87ebcee764e /server/publications | |
parent | a97360dcfba2bf1dd1be115dd91dd1dde49ded69 (diff) | |
download | wekan-663ba26d4dd0bba8330496a76035b1674031a299.tar.gz wekan-663ba26d4dd0bba8330496a76035b1674031a299.tar.bz2 wekan-663ba26d4dd0bba8330496a76035b1674031a299.zip |
Patch admin search feature
Diffstat (limited to 'server/publications')
-rw-r--r-- | server/publications/people.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/publications/people.js b/server/publications/people.js index cc8e3fc9..dbde8a61 100644 --- a/server/publications/people.js +++ b/server/publications/people.js @@ -1,4 +1,5 @@ -Meteor.publish('people', function(limit) { +Meteor.publish('people', function(query, limit) { + check(query, Match.OneOf(Object, null)); check(limit, Number); if (!Match.test(this.userId, String)) { @@ -8,7 +9,7 @@ Meteor.publish('people', function(limit) { const user = Users.findOne(this.userId); if (user && user.isAdmin) { return Users.find( - {}, + query, { limit, sort: { createdAt: -1 }, @@ -21,9 +22,8 @@ Meteor.publish('people', function(limit) { loginDisabled: 1, authenticationMethod: 1, }, - }, - ); - } else { - return []; + }); } + + return []; }); |