diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/service.js b/bigbluebutton-html5/imports/ui/components/video-provider/service.js
index ff80d6adc1..7441381028 100755
--- a/bigbluebutton-html5/imports/ui/components/video-provider/service.js
+++ b/bigbluebutton-html5/imports/ui/components/video-provider/service.js
@@ -454,8 +454,16 @@ class VideoService {
let users = [];
if (isGridEnabled) {
+ const selector = {
+ meetingId: Auth.meetingID,
+ };
+
+ if (this.hideUserlist() && this.getMyRole() === ROLE_VIEWER) {
+ selector.role = { $ne: ROLE_VIEWER };
+ }
+
users = Users.find(
- { meetingId: Auth.meetingID },
+ selector,
{ fields: { loggedOut: 1, left: 1, ...neededDataTypes} },
).fetch();
}
@@ -633,6 +641,12 @@ class VideoService {
return false;
}
+ hideUserlist() {
+ const meeting = Meetings.findOne({ meetingId: Auth.meetingID },
+ { fields: { 'lockSettingsProps.hideUserList': 1 } });
+ return meeting.lockSettingsProps ? meeting.lockSettingsProps.hideUserList : false;
+ }
+
hasCapReached() {
const meeting = Meetings.findOne(
{ meetingId: Auth.meetingID },