mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-18 18:17:47 +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:
@@ -2,8 +2,8 @@ import i18next from 'i18next';
|
||||
|
||||
import { IReduxState } from '../app/types';
|
||||
import { IConfig } from '../base/config/configType';
|
||||
import { MEET_FEATURES } from '../base/jwt/constants';
|
||||
import { isJwtFeatureEnabled } from '../base/jwt/functions';
|
||||
import { isLocalParticipantModerator } from '../base/participants/functions';
|
||||
|
||||
import JITSI_TO_BCP47_MAP from './jitsi-bcp47-map.json';
|
||||
import logger from './logger';
|
||||
@@ -77,8 +77,7 @@ export function isRecorderTranscriptionsRunning(state: IReduxState) {
|
||||
*/
|
||||
export function canAddTranscriber(state: IReduxState) {
|
||||
const { transcription } = state['features/base/config'];
|
||||
const isModerator = isLocalParticipantModerator(state);
|
||||
const isTranscribingAllowed = isJwtFeatureEnabled(state, 'transcription', isModerator, false);
|
||||
const isTranscribingAllowed = isJwtFeatureEnabled(state, MEET_FEATURES.TRANSCRIPTION, false);
|
||||
|
||||
return Boolean(transcription?.enabled) && isTranscribingAllowed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user