summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorguillaume <guillaume.cassou@orange.fr>2019-08-30 17:17:25 +0200
committerguillaume <guillaume.cassou@orange.fr>2019-08-30 17:17:25 +0200
commit663ba26d4dd0bba8330496a76035b1674031a299 (patch)
treed18b9495e2286b8e018c0564f26ce87ebcee764e /server
parenta97360dcfba2bf1dd1be115dd91dd1dde49ded69 (diff)
downloadwekan-663ba26d4dd0bba8330496a76035b1674031a299.tar.gz
wekan-663ba26d4dd0bba8330496a76035b1674031a299.tar.bz2
wekan-663ba26d4dd0bba8330496a76035b1674031a299.zip
Patch admin search feature
Diffstat (limited to 'server')
-rw-r--r--server/publications/people.js12
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 [];
});