[mirotalksfu] - logic improvements

هذا الالتزام موجود في:
Miroslav Pejic
2024-10-19 21:55:47 +02:00
الأصل b25d80fd7d
التزام c1d9680f80
4 ملفات معدلة مع 12 إضافات و13 حذوفات

عرض الملف

@@ -55,7 +55,7 @@ dev dependencies: {
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.5.91
* @version 1.5.92
*
*/
@@ -570,25 +570,24 @@ function startServer() {
const allowRoomAccess = isAllowedRoomAccess('/join/:roomId', req, hostCfg, roomList, roomId);
if (allowRoomAccess) {
// Protect unauthorized room access check from db...
// 1. Protect room access with database check
if (!OIDC.enabled && hostCfg.protected && hostCfg.users_from_db) {
const roomExists = await roomExistsForUser(roomId);
log.debug('/join/:roomId exists from api endpoint', roomExists);
log.debug('/join/:roomId exists from API endpoint', roomExists);
return roomExists ? res.sendFile(views.room) : res.redirect('/login');
}
// Protect unauthorized room access check from config file...
// 2. Protect room access with configuration check
if (!OIDC.enabled && hostCfg.protected && !hostCfg.users_from_db) {
const roomExists = hostCfg.users.some((user) => user.allowed_rooms.includes(roomId));
const roomExists = hostCfg.users.some(user =>
user.allowed_rooms && user.allowed_rooms.includes(roomId)
);
log.debug('/join/:roomId exists from config allowed rooms', roomExists);
return roomExists ? res.sendFile(views.room) : res.redirect('/whoAreYou/' + roomId);
}
res.sendFile(views.room);
} else {
// Who are you?
if (!OIDC.enabled && hostCfg.protected && hostCfg.users_from_db) {
return res.redirect('/whoAreYou/' + roomId);
}
!OIDC.enabled && hostCfg.protected ? res.redirect('/login') : res.redirect('/');
!OIDC.enabled && hostCfg.protected ? res.redirect('/whoAreYou/' + roomId) : res.redirect('/');
}
});

عرض الملف

@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
"version": "1.5.91",
"version": "1.5.92",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {

عرض الملف

@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.5.91
* @version 1.5.92
*
*/
@@ -4500,7 +4500,7 @@ function showAbout() {
imageUrl: image.about,
customClass: { image: 'img-about' },
position: 'center',
title: 'WebRTC SFU v1.5.91',
title: 'WebRTC SFU v1.5.92',
html: `
<br />
<div id="about">

عرض الملف

@@ -9,7 +9,7 @@
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.5.91
* @version 1.5.92
*
*/