Fix: use connection id to determine if a user is ejected or not

It used to be a boolean value which was durable if the server is
configured to use localStorage for bbb client settings. This would lead
to permanently blocking a user for all future BBB sessions.

To prevent that we use the connectionID to determine if a user is
blocked or not. If a user rejoins (in the same or a different meeting),
the connectionID is different, so the user can join again.
This commit is contained in:
Daniel Schreiber 2023-07-11 15:00:24 +02:00
parent f191d462ee
commit 67a491f07c

View File

@ -388,7 +388,11 @@ export default withTracker(() => {
const connectionIdUpdateTime = User?.connectionIdUpdateTime;
if (ejected) {
BBBStorage.setItem(USER_WAS_EJECTED, ejected);
// use the connectionID to block users, so we can detect if the user was
// blocked by the current connection. This is the case when a a user is
// ejected from a meeting but not permanently ejected. Permanent ejects are
// managed by the server, not by the client.
BBBStorage.setItem(USER_WAS_EJECTED, connectionID);
}
if (currentConnectionId && currentConnectionId !== connectionID && connectionIdUpdateTime > connectionAuthTime) {
@ -402,7 +406,7 @@ export default withTracker(() => {
const { streams: usersVideo } = VideoService.getVideoStreams();
return {
userWasEjected: BBBStorage.getItem(USER_WAS_EJECTED),
userWasEjected: (BBBStorage.getItem(USER_WAS_EJECTED) == connectionID),
approved,
ejected,
ejectedReason,