fix: Fixes promoting the only moderator in a non vpass meeting.

This commit is contained in:
damencho
2024-01-31 16:24:28 -06:00
committed by Дамян Минков
parent fec6de4536
commit 0a0b0a760e
4 changed files with 33 additions and 4 deletions

View File

@@ -283,6 +283,8 @@ function Util:process_and_verify_token(session, acceptedIssuers)
-- Binds the user details to the session if available
if claims["context"] ~= nil then
session.jitsi_meet_str_tenant = claims["context"]["tenant"];
if claims["context"]["user"] ~= nil then
session.jitsi_meet_context_user = claims["context"]["user"];
end
@@ -408,6 +410,14 @@ function Util:verify_room(session, room_address)
end
end
if session.jitsi_meet_str_tenant
and string.lower(session.jitsi_meet_str_tenant) ~= session.jitsi_web_query_prefix then
module:log('warn', 'Tenant differs for user:%s group:%s url_tenant:%s token_tenant:%s',
inspect(session.jitsi_meet_context_user), session.jitsi_meet_context_group,
session.jitsi_web_query_prefix, session.jitsi_meet_str_tenant);
session.jitsi_meet_tenant_mismatch = true;
end
local auth_domain = string.lower(session.jitsi_meet_domain);
local subdomain_to_check;
if target_subdomain then