bigbluebutton-Github/bigbluebutton-html5/server/methods/userLogout.js

15 lines
535 B
JavaScript
Raw Normal View History

import { isAllowedTo } from '/server/user_permissions';
import { requestUserLeaving } from '/server/collection_methods/users';
2016-04-20 01:43:31 +08:00
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);
}
}
});