bigbluebutton-Github/bigbluebutton-html5/server/methods/userLogout.js
2016-04-27 21:36:22 +00:00

15 lines
535 B
JavaScript

import { isAllowedTo } from '/server/user_permissions';
import { requestUserLeaving } from '/server/collection_methods/users';
Meteor.methods({
// meetingId: the meeting where the user is
// userId: the userid of the user logging out
// authToken: the authToken of the user
userLogout(meetingId, userId, authToken) {
if (isAllowedTo('logoutSelf', meetingId, userId, authToken)) {
Meteor.log.info(`a user is logging out from ${meetingId}:${userId}`);
return requestUserLeaving(meetingId, userId);
}
}
});