bigbluebutton-Github/bigbluebutton-html5/imports/api/users/server/methods/userLogout.js
2017-02-07 15:29:27 +00:00

15 lines
437 B
JavaScript
Executable File

import { Meteor } from 'meteor/meteor';
import { isAllowedTo } from '/imports/startup/server/userPermissions';
import userLeaving from './userLeaving';
export default function userLogout(credentials) {
if (!isAllowedTo('logoutSelf', credentials)) {
throw new Meteor.Error('not-allowed', `You are not allowed to logoutSelf`);
}
const { requesterUserId } = credentials;
return userLeaving(credentials, requesterUserId);
};