settings.js 349 B

12345678910111213
  1. Meteor.publish('setting', () => {
  2. return Settings.find({}, {fields:{disableRegistration: 1}});
  3. });
  4. Meteor.publish('mailServer', function () {
  5. if (!Match.test(this.userId, String))
  6. return [];
  7. const user = Users.findOne(this.userId);
  8. if(user && user.isAdmin){
  9. return Settings.find({}, {fields: {mailServer: 1}});
  10. }
  11. return [];
  12. });