mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 14:27:52 +00:00
feat: Backend reports default permissions.
When any of the backend is used 'anonymous', 'jitsi-anonymous', 'internal_hashed', 'internal_plain', 'cyrus' and a participant becomes a moderator, because of external module or because set from jicofo we send to client with the self-presence about becoming moderator a default set of permissions which can be controlled via prosody config. If using 'token' authentication the above applies only if there is a token and the token does not contain context.features.
This commit is contained in:
@@ -7,9 +7,10 @@ import { getRoomName } from '../base/conference/functions';
|
||||
import { getInviteURL } from '../base/connection/functions';
|
||||
import { isIosMobileBrowser } from '../base/environment/utils';
|
||||
import i18next from '../base/i18n/i18next';
|
||||
import { MEET_FEATURES } from '../base/jwt/constants';
|
||||
import { isJwtFeatureEnabled } from '../base/jwt/functions';
|
||||
import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
|
||||
import { getLocalParticipant, isLocalParticipantModerator } from '../base/participants/functions';
|
||||
import { getLocalParticipant } from '../base/participants/functions';
|
||||
import { toState } from '../base/redux/functions';
|
||||
import { doGetJSON } from '../base/util/httpUtils';
|
||||
import { parseURLParams } from '../base/util/parseURLParams';
|
||||
@@ -491,10 +492,8 @@ export function isAddPeopleEnabled(state: IReduxState): boolean {
|
||||
*/
|
||||
export function isDialOutEnabled(state: IReduxState): boolean {
|
||||
const { conference } = state['features/base/conference'];
|
||||
const isModerator = isLocalParticipantModerator(state);
|
||||
|
||||
return isJwtFeatureEnabled(state, 'outbound-call', isModerator, false)
|
||||
&& conference?.isSIPCallingSupported();
|
||||
return isJwtFeatureEnabled(state, MEET_FEATURES.OUTBOUND_CALL, false) && conference?.isSIPCallingSupported();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -505,10 +504,8 @@ export function isDialOutEnabled(state: IReduxState): boolean {
|
||||
*/
|
||||
export function isSipInviteEnabled(state: IReduxState): boolean {
|
||||
const { sipInviteUrl } = state['features/base/config'];
|
||||
const isModerator = isLocalParticipantModerator(state);
|
||||
|
||||
return isJwtFeatureEnabled(state, 'sip-outbound-call', isModerator, false)
|
||||
&& Boolean(sipInviteUrl);
|
||||
return isJwtFeatureEnabled(state, MEET_FEATURES.SIP_OUTBOUND_CALL, false) && Boolean(sipInviteUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user