Merge pull request #12565 from ramonlsouza/fix-presentation-upload

fix: check for presenter status at presentation upload modal
This commit is contained in:
Anton Georgiev 2021-06-14 17:01:29 -04:00 committed by GitHub
commit 6b2e070786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 16 deletions

View File

@ -295,6 +295,10 @@ class PresentationUploader extends Component {
} }
} }
componentWillUnmount() {
Session.set('showUploadPresentationView', false);
}
isDefault(presentation) { isDefault(presentation) {
const { defaultFileName } = this.props; const { defaultFileName } = this.props;
return presentation.filename === defaultFileName return presentation.filename === defaultFileName

View File

@ -155,17 +155,12 @@ const parseCurrentSlideContent = (yesValue, noValue, abstentionValue, trueValue,
}; };
const isPresenter = (podId) => { const isPresenter = (podId) => {
// a main presenter in the meeting always owns a default pod
if (podId !== 'DEFAULT_PRESENTATION_POD') {
// if a pod is not default, then we check whether this user owns a current pod
const selector = { const selector = {
meetingId: Auth.meetingID, meetingId: Auth.meetingID,
podId, podId,
}; };
const pod = PresentationPods.findOne(selector); const pod = PresentationPods.findOne(selector);
return pod.currentPresenterId === Auth.userID; return pod?.currentPresenterId === Auth.userID;
}
return true;
}; };
export default { export default {