bigbluebutton-Github/bigbluebutton-html5/imports/api/slides/server/publishers.js

23 lines
803 B
JavaScript
Raw Normal View History

2016-10-21 19:41:17 +08:00
import Slides from '/imports/api/slides';
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import { isAllowedTo } from '/imports/startup/server/userPermissions';
Meteor.publish('slides', (credentials) => {
// TODO: Some publishers have ACL and others dont
// if (!isAllowedTo('@@@', credentials)) {
// this.error(new Meteor.Error(402, "The user was not authorized to subscribe for 'slides'"));
// }
const { meetingId, requesterUserId, requesterToken } = credentials;
check(meetingId, String);
check(requesterUserId, String);
check(requesterToken, String);
Logger.info(`Publishing Slides for ${meetingId} ${requesterUserId} ${requesterToken}`);
return Slides.find({ meetingId: meetingId });
});