bigbluebutton-Github/bigbluebutton-html5/imports/api/users/server/methods/userLogout.js
Anton Georgiev a263c1388b lint mostly
2016-05-16 14:35:59 +00:00

16 lines
626 B
JavaScript

import { isAllowedTo } from '/imports/startup/server/userPermissions';
import { requestUserLeaving } from '/imports/api/users/server/modifiers/requestUserLeaving';
import { logger } from '/imports/startup/server/logger';
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)) {
logger.info(`a user is logging out from ${meetingId}:${userId}`);
return requestUserLeaving(meetingId, userId);
}
},
});