mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
13 lines
498 B
JavaScript
Executable file
13 lines
498 B
JavaScript
Executable file
import { Meteor } from 'meteor/meteor';
|
|
import { getLoginServices } from '../../helpers.js';
|
|
|
|
Meteor.publish('servicesList', function() {
|
|
let services = getLoginServices();
|
|
if (Package['accounts-password']) {
|
|
services.push({name: 'password'});
|
|
}
|
|
let fields = {};
|
|
// Publish the existing services for a user, only name or nothing else.
|
|
services.forEach(service => fields[`services.${service.name}.name`] = 1);
|
|
return Meteor.users.find({ _id: this.userId }, { fields: fields});
|
|
});
|