diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index b27feb679f..beac7843ac 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -5,6 +5,9 @@ on: - 'develop' - 'v2.[5-9].x-release' - 'v[3-9].*.x-release' + paths-ignore: + - 'docs/**' + - '**/*.md' pull_request: types: [opened, synchronize, reopened] permissions: diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 887d6e846b..7283f0bb0f 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -7,8 +7,8 @@ on: - 'v*' - 'develop' paths: - - 'docs/' - - '.github/' + - 'docs/**' + - '.github/**' # Do not build the docs concurrently concurrency: diff --git a/.gitignore b/.gitignore index 13f8a23908..d92d4d456d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ record-and-playback/.loadpath *~ cache/* artifacts/* +bbb-presentation-video.zip +bbb-presentation-video diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala index d1477f4a88..bdb29dd18c 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala @@ -68,7 +68,12 @@ trait PresentationUploadTokenReqMsgHdlr extends RightsManagementTrait { log.info("handlePresentationUploadTokenReqMsg" + liveMeeting.props.meetingProp.intId + " userId=" + msg.header.userId + " filename=" + msg.body.filename) - if (filterPresentationMessage(liveMeeting.users2x, msg.header.userId) && + if (liveMeeting.props.meetingProp.disabledFeatures.contains("presentation")) { + broadcastPresentationUploadTokenFailResp(msg) + val meetingId = liveMeeting.props.meetingProp.intId + val reason = "Presentation is disabled for this meeting" + PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, bus.outGW, liveMeeting) + } else if (filterPresentationMessage(liveMeeting.users2x, msg.header.userId) && permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) { val meetingId = liveMeeting.props.meetingProp.intId val reason = "No permission to request presentation upload token." diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala index a609bf8b13..ed248d5bd7 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala @@ -182,7 +182,6 @@ case class PresentationHasInvalidMimeTypeErrorSysPubMsgBody( fileExtension: String, ) - object PresentationUploadedFileTimeoutErrorSysPubMsg { val NAME = "PresentationUploadedFileTimeoutErrorSysPubMsg" } case class PresentationUploadedFileTimeoutErrorSysPubMsg( header: BbbClientMsgHeader, diff --git a/bbb-common-web/build.sbt b/bbb-common-web/build.sbt index 17ab8b19a4..66f55e5e23 100755 --- a/bbb-common-web/build.sbt +++ b/bbb-common-web/build.sbt @@ -105,7 +105,6 @@ libraryDependencies ++= Seq( "javax.validation" % "validation-api" % "2.0.1.Final", "org.springframework.boot" % "spring-boot-starter-validation" % "2.7.1", "org.springframework.data" % "spring-data-commons" % "2.7.6", - "org.glassfish" % "javax.el" % "3.0.1-b12", "org.apache.httpcomponents" % "httpclient" % "4.5.13", "org.postgresql" % "postgresql" % "42.4.3", "org.hibernate" % "hibernate-core" % "5.6.1.Final", diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java index d19a6a433a..7c7e3c977a 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java @@ -20,17 +20,8 @@ package org.bigbluebutton.api; import java.io.File; import java.net.URI; -import java.util.AbstractMap; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.Map.Entry; -import java.util.TreeMap; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -263,7 +254,6 @@ public class MeetingService implements MessageListener { RegisteredUser ru = registeredUser.getValue(); long elapsedTime = now - ru.getGuestWaitedOn(); - log.info("Determining if user [{}] should be purged. Elapsed time waiting [{}] with guest status [{}]", registeredUserID, elapsedTime, ru.getGuestStatus()); if (elapsedTime >= waitingGuestUsersTimeout && ru.getGuestStatus() == GuestPolicy.WAIT) { log.info("Purging user [{}]", registeredUserID); if (meeting.userUnregistered(registeredUserID) != null) { @@ -549,6 +539,11 @@ public class MeetingService implements MessageListener { return recordingService.isRecordingExist(recordId); } + public boolean isMeetingWithDisabledPresentation(String meetingId) { + Meeting m = getMeeting(meetingId); + return m.getDisabledFeatures().contains("presentation"); + } + public String getRecordings2x(List idList, List states, Map metadataFilters, String offset, String limit) { Pageable pageable = null; int o = -1; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceDbImpl.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceDbImpl.java index 7ba86444ad..4b48c06df6 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceDbImpl.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceDbImpl.java @@ -30,6 +30,7 @@ public class RecordingServiceDbImpl implements RecordingService { private RecordingMetadataReaderHelper recordingServiceHelper; private String recordStatusDir; private String captionsDir; + private Boolean allowFetchAllRecordings; private String presentationBaseDir; private String defaultServerUrl; private String defaultTextTrackUrl; @@ -74,7 +75,7 @@ public class RecordingServiceDbImpl implements RecordingService { @Override public String getRecordings2x(List idList, List states, Map metadataFilters, int offset, Pageable pageable) { // If no IDs or limit were provided return no recordings instead of every recording - if((idList == null || idList.isEmpty()) && pageable == null) return xmlService.noRecordings(); + if((idList == null || idList.isEmpty()) && pageable == null && !allowFetchAllRecordings) return xmlService.noRecordings(); logger.info("Retrieving all recordings"); Set recordings = new HashSet<>(dataStore.findAll(Recording.class)); @@ -262,6 +263,10 @@ public class RecordingServiceDbImpl implements RecordingService { captionsDir = dir; } + public void setAllowFetchAllRecordings(Boolean allowFetchAllRecordings) { + this.allowFetchAllRecordings = allowFetchAllRecordings; + } + public void setRecordingServiceHelper(RecordingMetadataReaderHelper r) { recordingServiceHelper = r; } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceFileImpl.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceFileImpl.java index a8ba25c096..2038bf00f7 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceFileImpl.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/service/impl/RecordingServiceFileImpl.java @@ -62,6 +62,7 @@ public class RecordingServiceFileImpl implements RecordingService { private XmlService xmlService; private String recordStatusDir; private String captionsDir; + private Boolean allowFetchAllRecordings; private String presentationBaseDir; private String defaultServerUrl; private String defaultTextTrackUrl; @@ -203,7 +204,7 @@ public class RecordingServiceFileImpl implements RecordingService { public String getRecordings2x(List idList, List states, Map metadataFilters, int offset, Pageable pageable) { // If no IDs or limit were provided return no recordings instead of every recording - if(idList.isEmpty() && pageable == null) return xmlService.noRecordings(); + if(idList.isEmpty() && pageable == null && !allowFetchAllRecordings) return xmlService.noRecordings(); List recsList = getRecordingsMetadata(idList, states); ArrayList recs = filterRecordingsByMetadata(recsList, metadataFilters); @@ -434,6 +435,8 @@ public class RecordingServiceFileImpl implements RecordingService { captionsDir = dir; } + public void setAllowFetchAllRecordings(Boolean allowFetchAllRecordings) { this.allowFetchAllRecordings = allowFetchAllRecordings; } + public void setRecordingServiceHelper(RecordingMetadataReaderHelper r) { recordingServiceHelper = r; } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/SlidesGenerationProgressNotifier.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/SlidesGenerationProgressNotifier.java index 08aa68c420..a09434daf7 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/SlidesGenerationProgressNotifier.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/SlidesGenerationProgressNotifier.java @@ -64,6 +64,7 @@ public class SlidesGenerationProgressNotifier { ); messagingService.sendDocConversionMsg(invalidMimeType); } + public void sendUploadFileTimedout(UploadedPresentation pres, int page) { UploadFileTimedoutMessage errorMessage = new UploadFileTimedoutMessage( pres.getPodId(), diff --git a/bbb-learning-dashboard/src/App.js b/bbb-learning-dashboard/src/App.js index ec55c60387..846b124e09 100644 --- a/bbb-learning-dashboard/src/App.js +++ b/bbb-learning-dashboard/src/App.js @@ -346,7 +346,7 @@ class App extends React.Component {

-

+
0 ? ( - + ) : null @@ -367,14 +367,14 @@ class App extends React.Component { { activitiesJson.endedOn === 0 ? ( - + ) : null }

-

+

:  {tsToHHmmss(totalOfActivity())} @@ -389,7 +389,7 @@ class App extends React.Component { }} > - + - + - + - +

-

+

{ lastUpdated && ( <> @@ -583,7 +583,7 @@ class App extends React.Component {