summaryrefslogtreecommitdiffstats
path: root/server/publications
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-12-05 08:20:59 +0200
committerLauri Ojansivu <x@xet7.org>2018-12-05 08:20:59 +0200
commite3a40aca6f09ced580df26f438855107752650dd (patch)
treededb9575bfb2e8d19b95643b39ca3ba2489e14ed /server/publications
parent0611e0c4bd13cb7d93e52abfeaf48f2c79a1ee15 (diff)
downloadwekan-e3a40aca6f09ced580df26f438855107752650dd.tar.gz
wekan-e3a40aca6f09ced580df26f438855107752650dd.tar.bz2
wekan-e3a40aca6f09ced580df26f438855107752650dd.zip
This release fixes the following bugs:
- Partially #2045 revert [Improve authentication](https://github.com/wekan/wekan/issues/2016), adding back password/LDAP dropdown, because login did now work. NOTE: This was added in v1.71, reverted at v1.73 because login did not work, added back at v1.79, and then reverted partially at v1.82 because login did not work. Related LDAP logout timer does not work yet. Thanks to xet7 !
Diffstat (limited to 'server/publications')
-rw-r--r--server/publications/pub-users.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/server/publications/pub-users.js b/server/publications/pub-users.js
new file mode 100644
index 00000000..f0c94153
--- /dev/null
+++ b/server/publications/pub-users.js
@@ -0,0 +1,28 @@
+Meteor.publish('user-miniprofile', function(userId) {
+ check(userId, String);
+
+ return Users.find(userId, {
+ fields: {
+ 'username': 1,
+ 'profile.fullname': 1,
+ 'profile.avatarUrl': 1,
+ },
+ });
+});
+
+Meteor.publish('user-admin', function() {
+ return Meteor.users.find(this.userId, {
+ fields: {
+ isAdmin: 1,
+ },
+ });
+});
+
+Meteor.publish('user-authenticationMethod', function(match) {
+ check(match, String);
+ return Users.find({$or: [{_id: match}, {email: match}, {username: match}]}, {
+ fields: {
+ 'authenticationMethod': 1,
+ },
+ });
+});