bigbluebutton-Github/bigbluebutton-html5/imports/api/meetings/server/modifiers/meetingHasEnded.js
Pedro Beschorner Marin 810deb907b refactor(etherpad): access control et al.
Move all Etherpad's access control from Meteor to a separated [Node application](https://github.com/bigbluebutton/bbb-pads).
This new app uses [Etherpad's API](https://etherpad.org/doc/v1.8.4/#index_overview)
to create groups and manage session tokens for users to access them. Each group
represents one distinct pad at the html5 client.

- Removed locked users' access to pads: replaced readOnly pad's access with a new pad's content sharing routine
- Pad's access is now controlled by [Etherpad's API](https://etherpad.org/doc/v1.8.4/#index_overview)
- Closed captions edited content now reflects at it's live feedback
- Improved closed caption's dictation mode live feedback
- Moved all Etherpad's API control from Meteor to a separated [app](https://github.com/bigbluebutton/bbb-pads)
- Included access control both in akka-apps and bbb-pads
2022-01-21 16:56:01 -03:00

72 lines
3.7 KiB
JavaScript
Executable File

import Meetings from '/imports/api/meetings';
import Logger from '/imports/startup/server/logger';
import { removeAnnotationsStreamer } from '/imports/api/annotations/server/streamer';
import { removeCursorStreamer } from '/imports/api/cursor/server/streamer';
import { removeExternalVideoStreamer } from '/imports/api/external-videos/server/streamer';
import clearUsers from '/imports/api/users/server/modifiers/clearUsers';
import clearUsersSettings from '/imports/api/users-settings/server/modifiers/clearUsersSettings';
import clearGroupChat from '/imports/api/group-chat/server/modifiers/clearGroupChat';
import clearGuestUsers from '/imports/api/guest-users/server/modifiers/clearGuestUsers';
import clearBreakouts from '/imports/api/breakouts/server/modifiers/clearBreakouts';
import clearAnnotations from '/imports/api/annotations/server/modifiers/clearAnnotations';
import clearSlides from '/imports/api/slides/server/modifiers/clearSlides';
import clearPolls from '/imports/api/polls/server/modifiers/clearPolls';
import clearCaptions from '/imports/api/captions/server/modifiers/clearCaptions';
import clearPads from '/imports/api/pads/server/modifiers/clearPads';
import clearPresentationPods from '/imports/api/presentation-pods/server/modifiers/clearPresentationPods';
import clearVoiceUsers from '/imports/api/voice-users/server/modifiers/clearVoiceUsers';
import clearUserInfo from '/imports/api/users-infos/server/modifiers/clearUserInfo';
import clearConnectionStatus from '/imports/api/connection-status/server/modifiers/clearConnectionStatus';
import clearScreenshare from '/imports/api/screenshare/server/modifiers/clearScreenshare';
import clearMeetingTimeRemaining from '/imports/api/meetings/server/modifiers/clearMeetingTimeRemaining';
import clearLocalSettings from '/imports/api/local-settings/server/modifiers/clearLocalSettings';
import clearRecordMeeting from './clearRecordMeeting';
import clearExternalVideoMeeting from './clearExternalVideoMeeting';
import clearVoiceCallStates from '/imports/api/voice-call-states/server/modifiers/clearVoiceCallStates';
import clearVideoStreams from '/imports/api/video-streams/server/modifiers/clearVideoStreams';
import clearAuthTokenValidation from '/imports/api/auth-token-validation/server/modifiers/clearAuthTokenValidation';
import clearUsersPersistentData from '/imports/api/users-persistent-data/server/modifiers/clearUsersPersistentData';
import clearWhiteboardMultiUser from '/imports/api/whiteboard-multi-user/server/modifiers/clearWhiteboardMultiUser';
import Metrics from '/imports/startup/server/metrics';
export default function meetingHasEnded(meetingId) {
if (!process.env.BBB_HTML5_ROLE || process.env.BBB_HTML5_ROLE === 'frontend') {
removeAnnotationsStreamer(meetingId);
removeCursorStreamer(meetingId);
removeExternalVideoStreamer(meetingId);
}
return Meetings.remove({ meetingId }, () => {
clearCaptions(meetingId);
clearPads(meetingId);
clearGroupChat(meetingId);
clearGuestUsers(meetingId);
clearPresentationPods(meetingId);
clearBreakouts(meetingId);
clearPolls(meetingId);
clearAnnotations(meetingId);
clearSlides(meetingId);
clearUsers(meetingId);
clearUsersSettings(meetingId);
clearVoiceUsers(meetingId);
clearUserInfo(meetingId);
clearConnectionStatus(meetingId);
clearLocalSettings(meetingId);
clearMeetingTimeRemaining(meetingId);
clearRecordMeeting(meetingId);
clearExternalVideoMeeting(meetingId);
clearVoiceCallStates(meetingId);
clearVideoStreams(meetingId);
clearAuthTokenValidation(meetingId);
clearWhiteboardMultiUser(meetingId);
clearScreenshare(meetingId);
clearUsersPersistentData(meetingId);
Metrics.removeMeeting(meetingId);
Logger.info(`Cleared Meetings with id ${meetingId}`);
});
}