bigbluebutton-Github/bigbluebutton-html5/imports/api/users/server/methods/userLogout.js

14 lines
548 B
JavaScript
Raw Normal View History

import { isAllowedTo } from '/imports/startup/server/userPermissions';
2016-05-16 22:35:59 +08:00
import { requestUserLeaving } from '/imports/api/users/server/modifiers/requestUserLeaving';
2016-05-05 02:29:43 +08:00
import { logger } from '/imports/startup/server/logger';
2016-04-20 01:43:31 +08:00
Meteor.methods({
2016-05-17 02:12:27 +08:00
userLogout(credentials) {
if (isAllowedTo('logoutSelf', credentials)) {
const { meetingId, requesterUserId, requesterToken } = credentials;
2016-06-18 06:15:11 +08:00
logger.info(`a user is logging out from ${meetingId}:${requesterUserId}`);
return requestUserLeaving(meetingId, requesterUserId);
2016-04-20 01:43:31 +08:00
}
2016-05-05 05:49:01 +08:00
},
2016-04-20 01:43:31 +08:00
});