23 lines
793 B
JavaScript
Executable File
23 lines
793 B
JavaScript
Executable File
import Cursor from '/imports/api/cursor';
|
|
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('cursor', (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 'cursor'"));
|
|
// }
|
|
|
|
const { meetingId, requesterUserId, requesterToken } = credentials;
|
|
|
|
check(meetingId, String);
|
|
check(requesterUserId, String);
|
|
check(requesterToken, String);
|
|
|
|
Logger.debug(`Publishing Cursor for ${meetingId} ${requesterUserId} ${requesterToken}`);
|
|
|
|
return Cursor.find({ meetingId });
|
|
});
|