Rename room config properties to remove redundant "config" suffix
This commit is contained in:
parent
390dbe3600
commit
465a68295f
@ -8,9 +8,9 @@ content:
|
|||||||
$ref: '../schemas/meet-room-config.yaml#/MeetRoomConfig'
|
$ref: '../schemas/meet-room-config.yaml#/MeetRoomConfig'
|
||||||
example:
|
example:
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@ -15,11 +15,11 @@ content:
|
|||||||
withMeeting: when_meeting_ends
|
withMeeting: when_meeting_ends
|
||||||
withRecordings: close
|
withRecordings: close
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
||||||
@ -39,11 +39,11 @@ content:
|
|||||||
creationDate: 1620000000000
|
creationDate: 1620000000000
|
||||||
autoDeletionDate: 1900000000000
|
autoDeletionDate: 1900000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
fields=moderatorUrl,speakerUrl:
|
fields=moderatorUrl,speakerUrl:
|
||||||
|
|||||||
@ -24,11 +24,11 @@ content:
|
|||||||
withMeeting: when_meeting_ends
|
withMeeting: when_meeting_ends
|
||||||
withRecordings: close
|
withRecordings: close
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
||||||
@ -42,11 +42,11 @@ content:
|
|||||||
withMeeting: when_meeting_ends
|
withMeeting: when_meeting_ends
|
||||||
withRecordings: close
|
withRecordings: close
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: false
|
enabled: false
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: true
|
enabled: true
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: false
|
enabled: false
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-456?secret=789012'
|
moderatorUrl: 'http://localhost:6080/room/room-456?secret=789012'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-456?secret=210987'
|
speakerUrl: 'http://localhost:6080/room/room-456?secret=210987'
|
||||||
@ -74,22 +74,22 @@ content:
|
|||||||
creationDate: 1620000000000
|
creationDate: 1620000000000
|
||||||
autoDeletionDate: 1900000000000
|
autoDeletionDate: 1900000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
- roomId: 'room-456'
|
- roomId: 'room-456'
|
||||||
roomName: 'room'
|
roomName: 'room'
|
||||||
creationDate: 1620001000000
|
creationDate: 1620001000000
|
||||||
autoDeletionDate: 1900000000000
|
autoDeletionDate: 1900000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: false
|
enabled: false
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: true
|
enabled: true
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: false
|
enabled: false
|
||||||
pagination:
|
pagination:
|
||||||
isTruncated: true
|
isTruncated: true
|
||||||
|
|||||||
@ -41,11 +41,11 @@ content:
|
|||||||
roomName: room
|
roomName: room
|
||||||
creationDate: 1620000000000
|
creationDate: 1620000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
||||||
@ -64,11 +64,11 @@ content:
|
|||||||
roomName: room
|
roomName: room
|
||||||
creationDate: 1620000000000
|
creationDate: 1620000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
||||||
|
|||||||
@ -26,11 +26,11 @@ content:
|
|||||||
roomName: room
|
roomName: room
|
||||||
creationDate: 1620000000000
|
creationDate: 1620000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
||||||
@ -45,11 +45,11 @@ content:
|
|||||||
roomName: room
|
roomName: room
|
||||||
creationDate: 1620000000000
|
creationDate: 1620000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
||||||
@ -64,11 +64,11 @@ content:
|
|||||||
roomName: room
|
roomName: room
|
||||||
creationDate: 1620000000000
|
creationDate: 1620000000000
|
||||||
config:
|
config:
|
||||||
chatConfig:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
recordingConfig:
|
recording:
|
||||||
enabled: false
|
enabled: false
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
enabled: true
|
enabled: true
|
||||||
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456'
|
||||||
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
speakerUrl: 'http://localhost:6080/room/room-123?secret=654321'
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
MeetRoomConfig:
|
MeetRoomConfig:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
chatConfig:
|
chat:
|
||||||
$ref: '#/MeetChatConfig'
|
$ref: '#/MeetChatConfig'
|
||||||
description: Config for the chat feature in the room.
|
description: Config for the chat feature in the room.
|
||||||
recordingConfig:
|
recording:
|
||||||
$ref: '#/MeetRecordingConfig'
|
$ref: '#/MeetRecordingConfig'
|
||||||
description: Config for recording the room.
|
description: Config for recording the room.
|
||||||
virtualBackgroundConfig:
|
virtualBackground:
|
||||||
$ref: '#/MeetVirtualBackgroundConfig'
|
$ref: '#/MeetVirtualBackgroundConfig'
|
||||||
description: Config for virtual background in the room.
|
description: Config for virtual background in the room.
|
||||||
MeetChatConfig:
|
MeetChatConfig:
|
||||||
|
|||||||
@ -111,11 +111,13 @@ export const logEnvVars = () => {
|
|||||||
console.log('MEET PREFERENCES STORAGE:', text(MEET_PREFERENCES_STORAGE_MODE));
|
console.log('MEET PREFERENCES STORAGE:', text(MEET_PREFERENCES_STORAGE_MODE));
|
||||||
console.log('MEET INITIAL ADMIN USER: ', credential('****' + MEET_INITIAL_ADMIN_USER.slice(-3)));
|
console.log('MEET INITIAL ADMIN USER: ', credential('****' + MEET_INITIAL_ADMIN_USER.slice(-3)));
|
||||||
console.log('MEET INITIAL ADMIN PASSWORD: ', credential('****' + MEET_INITIAL_ADMIN_PASSWORD.slice(-3)));
|
console.log('MEET INITIAL ADMIN PASSWORD: ', credential('****' + MEET_INITIAL_ADMIN_PASSWORD.slice(-3)));
|
||||||
|
|
||||||
if (!MEET_INITIAL_API_KEY) {
|
if (!MEET_INITIAL_API_KEY) {
|
||||||
console.log(chalk.red('MEET INITIAL_API_KEY: none'));
|
console.log(chalk.red('MEET INITIAL_API_KEY: none'));
|
||||||
} else {
|
} else {
|
||||||
console.log('MEET INITIAL API KEY: ', credential('****' + MEET_INITIAL_API_KEY.slice(-3)));
|
console.log('MEET INITIAL API KEY: ', credential('****' + MEET_INITIAL_API_KEY.slice(-3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('MEET INITIAL WEBHOOK ENABLED:', text(MEET_INITIAL_WEBHOOK_ENABLED));
|
console.log('MEET INITIAL WEBHOOK ENABLED:', text(MEET_INITIAL_WEBHOOK_ENABLED));
|
||||||
|
|
||||||
if (MEET_INITIAL_WEBHOOK_ENABLED === 'true') {
|
if (MEET_INITIAL_WEBHOOK_ENABLED === 'true') {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export const withRecordingEnabled = async (req: Request, res: Response, next: Ne
|
|||||||
const roomId = extractRoomIdFromRequest(req);
|
const roomId = extractRoomIdFromRequest(req);
|
||||||
const room: MeetRoom = await roomService.getMeetRoom(roomId!);
|
const room: MeetRoom = await roomService.getMeetRoom(roomId!);
|
||||||
|
|
||||||
if (!room.config?.recordingConfig?.enabled) {
|
if (!room.config.recording.enabled) {
|
||||||
logger.debug(`Recording is disabled for room '${roomId}'`);
|
logger.debug(`Recording is disabled for room '${roomId}'`);
|
||||||
const error = errorRecordingDisabled(roomId!);
|
const error = errorRecordingDisabled(roomId!);
|
||||||
return rejectRequestFromMeetError(res, error);
|
return rejectRequestFromMeetError(res, error);
|
||||||
|
|||||||
@ -90,9 +90,9 @@ const VirtualBackgroundConfigSchema: z.ZodType<MeetVirtualBackgroundConfig> = z.
|
|||||||
});
|
});
|
||||||
|
|
||||||
const RoomConfigSchema: z.ZodType<MeetRoomConfig> = z.object({
|
const RoomConfigSchema: z.ZodType<MeetRoomConfig> = z.object({
|
||||||
recordingConfig: RecordingConfigSchema,
|
recording: RecordingConfigSchema,
|
||||||
chatConfig: ChatConfigSchema,
|
chat: ChatConfigSchema,
|
||||||
virtualBackgroundConfig: VirtualBackgroundConfigSchema
|
virtualBackground: VirtualBackgroundConfigSchema
|
||||||
});
|
});
|
||||||
|
|
||||||
const RoomDeletionPolicyWithMeetingSchema: z.ZodType<MeetRoomDeletionPolicyWithMeeting> = z.enum([
|
const RoomDeletionPolicyWithMeetingSchema: z.ZodType<MeetRoomDeletionPolicyWithMeeting> = z.enum([
|
||||||
@ -151,9 +151,9 @@ const RoomRequestOptionsSchema: z.ZodType<MeetRoomOptions> = z.object({
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
config: RoomConfigSchema.optional().default({
|
config: RoomConfigSchema.optional().default({
|
||||||
recordingConfig: { enabled: true, allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER },
|
recording: { enabled: true, allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER },
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
})
|
})
|
||||||
// maxParticipants: z
|
// maxParticipants: z
|
||||||
// .number()
|
// .number()
|
||||||
|
|||||||
@ -62,7 +62,7 @@ export const configureRecordingTokenAuth = async (req: Request, res: Response, n
|
|||||||
throw errorRoomMetadataNotFound(roomId);
|
throw errorRoomMetadataNotFound(roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
const recordingAccess = room.config!.recordingConfig.allowAccessTo;
|
const recordingAccess = room.config?.recording.allowAccessTo;
|
||||||
|
|
||||||
if (!recordingAccess || recordingAccess === MeetRecordingAccess.ADMIN) {
|
if (!recordingAccess || recordingAccess === MeetRecordingAccess.ADMIN) {
|
||||||
// Deny request if the room is configured to allow access to recordings only for admins
|
// Deny request if the room is configured to allow access to recordings only for admins
|
||||||
|
|||||||
@ -75,7 +75,7 @@ export class FrontendEventService {
|
|||||||
try {
|
try {
|
||||||
const payload: MeetRoomConfigUpdatedPayload = {
|
const payload: MeetRoomConfigUpdatedPayload = {
|
||||||
roomId,
|
roomId,
|
||||||
config: updatedRoom.config!,
|
config: updatedRoom.config,
|
||||||
timestamp: Date.now()
|
timestamp: Date.now()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -684,7 +684,7 @@ export class RoomService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected getRecordingPermissions(room: Partial<MeetRoom>, role: ParticipantRole): RecordingPermissions {
|
protected getRecordingPermissions(room: Partial<MeetRoom>, role: ParticipantRole): RecordingPermissions {
|
||||||
const recordingAccess = room.config!.recordingConfig.allowAccessTo;
|
const recordingAccess = room.config?.recording.allowAccessTo;
|
||||||
|
|
||||||
// A participant can delete recordings if they are a moderator and the recording access is not set to admin
|
// A participant can delete recordings if they are a moderator and the recording access is not set to admin
|
||||||
const canDeleteRecordings = role === ParticipantRole.MODERATOR && recordingAccess !== MeetRecordingAccess.ADMIN;
|
const canDeleteRecordings = role === ParticipantRole.MODERATOR && recordingAccess !== MeetRecordingAccess.ADMIN;
|
||||||
|
|||||||
@ -303,7 +303,7 @@ export class MeetStorageService<
|
|||||||
moderatorUrl: room.moderatorUrl,
|
moderatorUrl: room.moderatorUrl,
|
||||||
speakerUrl: room.speakerUrl,
|
speakerUrl: room.speakerUrl,
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: room.config?.recordingConfig
|
recording: room.config.recording
|
||||||
}
|
}
|
||||||
} as Partial<MRoom>;
|
} as Partial<MRoom>;
|
||||||
|
|
||||||
|
|||||||
@ -146,12 +146,12 @@ export const expectValidRoom = (
|
|||||||
expect(room.config).toEqual(config);
|
expect(room.config).toEqual(config);
|
||||||
} else {
|
} else {
|
||||||
expect(room.config).toEqual({
|
expect(room.config).toEqual({
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -263,14 +263,14 @@ export const updateRoomConfig = async (roomId: string, config: any) => {
|
|||||||
|
|
||||||
export const updateRecordingAccessConfigInRoom = async (roomId: string, recordingAccess: MeetRecordingAccess) => {
|
export const updateRecordingAccessConfigInRoom = async (roomId: string, recordingAccess: MeetRecordingAccess) => {
|
||||||
const response = await updateRoomConfig(roomId, {
|
const response = await updateRoomConfig(roomId, {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: recordingAccess
|
allowAccessTo: recordingAccess
|
||||||
},
|
},
|
||||||
chatConfig: {
|
chat: {
|
||||||
enabled: true
|
enabled: true
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: {
|
virtualBackground: {
|
||||||
enabled: true
|
enabled: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -59,12 +59,12 @@ describe('Room API Tests', () => {
|
|||||||
withRecordings: MeetRoomDeletionPolicyWithRecordings.FORCE
|
withRecordings: MeetRoomDeletionPolicyWithRecordings.FORCE
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: false },
|
chat: { enabled: false },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -237,12 +237,12 @@ describe('Room API Tests', () => {
|
|||||||
roomName: 'TestRoom',
|
roomName: 'TestRoom',
|
||||||
autoDeletionDate: validAutoDeletionDate,
|
autoDeletionDate: validAutoDeletionDate,
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: 'yes', // invalid boolean
|
enabled: 'yes', // invalid boolean
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -6,12 +6,12 @@ import { setupSingleRoom } from '../../../helpers/test-scenarios.js';
|
|||||||
|
|
||||||
describe('Room API Tests', () => {
|
describe('Room API Tests', () => {
|
||||||
const DEFAULT_CONFIG = {
|
const DEFAULT_CONFIG = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
@ -36,12 +36,12 @@ describe('Room API Tests', () => {
|
|||||||
const payload = {
|
const payload = {
|
||||||
roomName: 'custom-prefs',
|
roomName: 'custom-prefs',
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -36,12 +36,12 @@ describe('Room API Tests', () => {
|
|||||||
const payload = {
|
const payload = {
|
||||||
roomName: 'custom-prefs',
|
roomName: 'custom-prefs',
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Create a room with custom config
|
// Create a room with custom config
|
||||||
|
|||||||
@ -34,23 +34,23 @@ describe('Room API Tests', () => {
|
|||||||
const createdRoom = await createRoom({
|
const createdRoom = await createRoom({
|
||||||
roomName: 'update-test',
|
roomName: 'update-test',
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update the room config
|
// Update the room config
|
||||||
const updatedConfig = {
|
const updatedConfig = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN
|
allowAccessTo: MeetRecordingAccess.ADMIN
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: false },
|
chat: { enabled: false },
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
};
|
};
|
||||||
const updateResponse = await updateRoomConfig(createdRoom.roomId, updatedConfig);
|
const updateResponse = await updateRoomConfig(createdRoom.roomId, updatedConfig);
|
||||||
|
|
||||||
@ -82,23 +82,23 @@ describe('Room API Tests', () => {
|
|||||||
const createdRoom = await createRoom({
|
const createdRoom = await createRoom({
|
||||||
roomName: 'partial-update',
|
roomName: 'partial-update',
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update only one preference
|
// Update only one preference
|
||||||
const partialConfig = {
|
const partialConfig = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
};
|
};
|
||||||
const updateResponse = await updateRoomConfig(createdRoom.roomId, partialConfig);
|
const updateResponse = await updateRoomConfig(createdRoom.roomId, partialConfig);
|
||||||
|
|
||||||
@ -121,17 +121,17 @@ describe('Room API Tests', () => {
|
|||||||
|
|
||||||
// Invalid config (missing required fields)
|
// Invalid config (missing required fields)
|
||||||
const invalidConfig = {
|
const invalidConfig = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
// Missing chatConfig
|
// Missing chat config
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
};
|
};
|
||||||
const response = await updateRoomConfig(roomId, invalidConfig);
|
const response = await updateRoomConfig(roomId, invalidConfig);
|
||||||
|
|
||||||
expect(response.status).toBe(422);
|
expect(response.status).toBe(422);
|
||||||
expect(response.body.error).toContain('Unprocessable Entity');
|
expect(response.body.error).toContain('Unprocessable Entity');
|
||||||
expect(JSON.stringify(response.body.details)).toContain('chatConfig');
|
expect(JSON.stringify(response.body.details)).toContain('chat');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should fail when config has incorrect types', async () => {
|
it('should fail when config has incorrect types', async () => {
|
||||||
@ -141,18 +141,18 @@ describe('Room API Tests', () => {
|
|||||||
|
|
||||||
// Invalid config (wrong types)
|
// Invalid config (wrong types)
|
||||||
const invalidConfig = {
|
const invalidConfig = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: 'true', // String instead of boolean
|
enabled: 'true', // String instead of boolean
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: false },
|
chat: { enabled: false },
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
};
|
};
|
||||||
const response = await updateRoomConfig(createdRoom.roomId, invalidConfig);
|
const response = await updateRoomConfig(createdRoom.roomId, invalidConfig);
|
||||||
|
|
||||||
expect(response.status).toBe(422);
|
expect(response.status).toBe(422);
|
||||||
expect(response.body.error).toContain('Unprocessable Entity');
|
expect(response.body.error).toContain('Unprocessable Entity');
|
||||||
expect(JSON.stringify(response.body.details)).toContain('recordingConfig.enabled');
|
expect(JSON.stringify(response.body.details)).toContain('recording.enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should fail when config is missing required properties', async () => {
|
it('should fail when config is missing required properties', async () => {
|
||||||
@ -173,29 +173,29 @@ describe('Room API Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const invalidConfig = {
|
const invalidConfig = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true // Missing allowAccessTo
|
enabled: true // Missing allowAccessTo
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: false },
|
chat: { enabled: false },
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
};
|
};
|
||||||
const response = await updateRoomConfig(createdRoom.roomId, invalidConfig);
|
const response = await updateRoomConfig(createdRoom.roomId, invalidConfig);
|
||||||
|
|
||||||
expect(response.status).toBe(422);
|
expect(response.status).toBe(422);
|
||||||
expect(response.body.error).toContain('Unprocessable Entity');
|
expect(response.body.error).toContain('Unprocessable Entity');
|
||||||
expect(JSON.stringify(response.body.details)).toContain('recordingConfig.allowAccessTo');
|
expect(JSON.stringify(response.body.details)).toContain('recording.allowAccessTo');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return 404 when updating non-existent room', async () => {
|
it('should return 404 when updating non-existent room', async () => {
|
||||||
const nonExistentRoomId = 'non-existent-room';
|
const nonExistentRoomId = 'non-existent-room';
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: false },
|
chat: { enabled: false },
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
};
|
};
|
||||||
const response = await updateRoomConfig(nonExistentRoomId, config);
|
const response = await updateRoomConfig(nonExistentRoomId, config);
|
||||||
|
|
||||||
|
|||||||
@ -244,12 +244,12 @@ describe('Room API Security Tests', () => {
|
|||||||
|
|
||||||
describe('Update Room Config Tests', () => {
|
describe('Update Room Config Tests', () => {
|
||||||
const roomConfig = {
|
const roomConfig = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
};
|
};
|
||||||
|
|
||||||
let roomId: string;
|
let roomId: string;
|
||||||
|
|||||||
@ -90,7 +90,7 @@ export class RecordingConfigComponent implements OnDestroy {
|
|||||||
|
|
||||||
const stepData: any = {
|
const stepData: any = {
|
||||||
config: {
|
config: {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled,
|
enabled,
|
||||||
...(enabled && { allowAccessTo: formValue.allowAccessTo })
|
...(enabled && { allowAccessTo: formValue.allowAccessTo })
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,10 +35,10 @@ export class RoomConfigComponent implements OnDestroy {
|
|||||||
private saveFormData(formValue: any): void {
|
private saveFormData(formValue: any): void {
|
||||||
const stepData: any = {
|
const stepData: any = {
|
||||||
config: {
|
config: {
|
||||||
chatConfig: {
|
chat: {
|
||||||
enabled: formValue.chatEnabled
|
enabled: formValue.chatEnabled
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: {
|
virtualBackground: {
|
||||||
enabled: formValue.virtualBackgroundsEnabled
|
enabled: formValue.virtualBackgroundsEnabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -383,7 +383,7 @@ export class MeetingComponent implements OnInit {
|
|||||||
this.featureConfService.setRoomConfig(config);
|
this.featureConfService.setRoomConfig(config);
|
||||||
|
|
||||||
// Refresh recording token if recording is enabled
|
// Refresh recording token if recording is enabled
|
||||||
if (config.recordingConfig.enabled) {
|
if (config.recording.enabled) {
|
||||||
try {
|
try {
|
||||||
await this.recordingService.generateRecordingToken(this.roomId, this.roomSecret);
|
await this.recordingService.generateRecordingToken(this.roomId, this.roomSecret);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@ -138,9 +138,9 @@ export class FeatureConfigurationService {
|
|||||||
|
|
||||||
// Apply room configurations
|
// Apply room configurations
|
||||||
if (roomPrefs) {
|
if (roomPrefs) {
|
||||||
features.showRecordingPanel = roomPrefs.recordingConfig.enabled;
|
features.showRecordingPanel = roomPrefs.recording.enabled;
|
||||||
features.showChat = roomPrefs.chatConfig.enabled;
|
features.showChat = roomPrefs.chat.enabled;
|
||||||
features.showBackgrounds = roomPrefs.virtualBackgroundConfig.enabled;
|
features.showBackgrounds = roomPrefs.virtualBackground.enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply participant permissions (these can restrict enabled features)
|
// Apply participant permissions (these can restrict enabled features)
|
||||||
|
|||||||
@ -11,12 +11,12 @@ import {
|
|||||||
|
|
||||||
// Default room config following the app's defaults
|
// Default room config following the app's defaults
|
||||||
const DEFAULT_CONFIG: MeetRoomConfig = {
|
const DEFAULT_CONFIG: MeetRoomConfig = {
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -156,8 +156,8 @@ export class RoomWizardStateService {
|
|||||||
isActive: editMode, // Only active in edit mode
|
isActive: editMode, // Only active in edit mode
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
formGroup: this.formBuilder.group({
|
formGroup: this.formBuilder.group({
|
||||||
recordingEnabled: initialRoomOptions.config!.recordingConfig.enabled ? 'enabled' : 'disabled',
|
recordingEnabled: initialRoomOptions.config!.recording.enabled ? 'enabled' : 'disabled',
|
||||||
allowAccessTo: initialRoomOptions.config!.recordingConfig.allowAccessTo
|
allowAccessTo: initialRoomOptions.config!.recording.allowAccessTo
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -187,8 +187,8 @@ export class RoomWizardStateService {
|
|||||||
isActive: false,
|
isActive: false,
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
formGroup: this.formBuilder.group({
|
formGroup: this.formBuilder.group({
|
||||||
chatEnabled: initialRoomOptions.config!.chatConfig.enabled,
|
chatEnabled: initialRoomOptions.config!.chat.enabled,
|
||||||
virtualBackgroundsEnabled: initialRoomOptions.config!.virtualBackgroundConfig.enabled
|
virtualBackgroundsEnabled: initialRoomOptions.config!.virtualBackground.enabled
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -234,9 +234,9 @@ export class RoomWizardStateService {
|
|||||||
...currentOptions,
|
...currentOptions,
|
||||||
config: {
|
config: {
|
||||||
...currentOptions.config,
|
...currentOptions.config,
|
||||||
recordingConfig: {
|
recording: {
|
||||||
...currentOptions.config?.recordingConfig,
|
...currentOptions.config?.recording,
|
||||||
...stepData.config?.recordingConfig
|
...stepData.config?.recording
|
||||||
}
|
}
|
||||||
} as MeetRoomConfig
|
} as MeetRoomConfig
|
||||||
};
|
};
|
||||||
@ -251,17 +251,17 @@ export class RoomWizardStateService {
|
|||||||
...currentOptions,
|
...currentOptions,
|
||||||
config: {
|
config: {
|
||||||
...currentOptions.config,
|
...currentOptions.config,
|
||||||
chatConfig: {
|
chat: {
|
||||||
...currentOptions.config?.chatConfig,
|
...currentOptions.config?.chat,
|
||||||
...stepData.config?.chatConfig
|
...stepData.config?.chat
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: {
|
virtualBackground: {
|
||||||
...currentOptions.config?.virtualBackgroundConfig,
|
...currentOptions.config?.virtualBackground,
|
||||||
...stepData.config?.virtualBackgroundConfig
|
...stepData.config?.virtualBackground
|
||||||
},
|
},
|
||||||
recordingConfig: {
|
recording: {
|
||||||
...currentOptions.config?.recordingConfig,
|
...currentOptions.config?.recording,
|
||||||
...stepData.config?.recordingConfig
|
...stepData.config?.recording
|
||||||
}
|
}
|
||||||
} as MeetRoomConfig
|
} as MeetRoomConfig
|
||||||
};
|
};
|
||||||
@ -283,7 +283,7 @@ export class RoomWizardStateService {
|
|||||||
const currentSteps = this._steps();
|
const currentSteps = this._steps();
|
||||||
const currentOptions = this._roomOptions();
|
const currentOptions = this._roomOptions();
|
||||||
// TODO: Uncomment when recording config is fully implemented
|
// TODO: Uncomment when recording config is fully implemented
|
||||||
const recordingEnabled = false; // currentOptions.config?.recordingConfig.enabled ?? false;
|
const recordingEnabled = false; // currentOptions.config?.recording.enabled ?? false;
|
||||||
|
|
||||||
// Update recording steps visibility based on recordingEnabled
|
// Update recording steps visibility based on recordingEnabled
|
||||||
const updatedSteps = currentSteps.map((step) => {
|
const updatedSteps = currentSteps.map((step) => {
|
||||||
|
|||||||
@ -75,12 +75,12 @@ test.describe('Recording Access Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN
|
allowAccessTo: MeetRecordingAccess.ADMIN
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -96,12 +96,12 @@ test.describe('Recording Access Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN
|
allowAccessTo: MeetRecordingAccess.ADMIN
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -117,12 +117,12 @@ test.describe('Recording Access Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -138,12 +138,12 @@ test.describe('Recording Access Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -159,12 +159,12 @@ test.describe('Recording Access Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -180,12 +180,12 @@ test.describe('Recording Access Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
|
|||||||
@ -76,12 +76,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -100,12 +100,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: false },
|
chat: { enabled: false },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -129,12 +129,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -163,12 +163,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -188,12 +188,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -229,12 +229,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -258,12 +258,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -287,12 +287,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
@ -308,12 +308,12 @@ test.describe('UI Feature Config Tests', () => {
|
|||||||
await updateRoomConfig(
|
await updateRoomConfig(
|
||||||
roomId,
|
roomId,
|
||||||
{
|
{
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: { enabled: false }
|
virtualBackground: { enabled: false }
|
||||||
},
|
},
|
||||||
adminCookie
|
adminCookie
|
||||||
);
|
);
|
||||||
|
|||||||
@ -90,12 +90,12 @@ export async function interactWithElementInIframe(
|
|||||||
|
|
||||||
// Helper function to get default room config
|
// Helper function to get default room config
|
||||||
const getDefaultRoomConfig = (): MeetRoomConfig => ({
|
const getDefaultRoomConfig = (): MeetRoomConfig => ({
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
allowAccessTo: MeetRecordingAccess.ADMIN_MODERATOR_SPEAKER
|
||||||
},
|
},
|
||||||
chatConfig: { enabled: true },
|
chat: { enabled: true },
|
||||||
virtualBackgroundConfig: { enabled: true }
|
virtualBackground: { enabled: true }
|
||||||
});
|
});
|
||||||
|
|
||||||
// Helper function to create a room for testing
|
// Helper function to create a room for testing
|
||||||
|
|||||||
@ -208,7 +208,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="config.chatConfig.enabled"
|
name="config.chat.enabled"
|
||||||
id="chat-enabled"
|
id="chat-enabled"
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
checked
|
checked
|
||||||
@ -246,7 +246,7 @@
|
|||||||
<div class="form-check mb-2">
|
<div class="form-check mb-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="config.recordingConfig.enabled"
|
name="config.recording.enabled"
|
||||||
id="recording-enabled"
|
id="recording-enabled"
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
checked
|
checked
|
||||||
@ -262,7 +262,7 @@
|
|||||||
>Recording Access Level</label
|
>Recording Access Level</label
|
||||||
>
|
>
|
||||||
<select
|
<select
|
||||||
name="config.recordingConfig.allowAccessTo"
|
name="config.recording.allowAccessTo"
|
||||||
id="recording-access"
|
id="recording-access"
|
||||||
class="form-select"
|
class="form-select"
|
||||||
data-testid="recording-access-select"
|
data-testid="recording-access-select"
|
||||||
@ -304,7 +304,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="config.virtualBackgroundConfig.enabled"
|
name="config.virtualBackground.enabled"
|
||||||
id="virtual-background-enabled"
|
id="virtual-background-enabled"
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
checked
|
checked
|
||||||
|
|||||||
@ -158,18 +158,18 @@ export const deleteAllRecordingsCtrl = async (_req: Request, res: Response) => {
|
|||||||
*/
|
*/
|
||||||
const processFormConfig = (body: any): any => {
|
const processFormConfig = (body: any): any => {
|
||||||
const config = {
|
const config = {
|
||||||
chatConfig: {
|
chat: {
|
||||||
enabled: body['config.chatConfig.enabled'] === 'on'
|
enabled: body['config.chat.enabled'] === 'on'
|
||||||
},
|
},
|
||||||
recordingConfig: {
|
recording: {
|
||||||
enabled: body['config.recordingConfig.enabled'] === 'on',
|
enabled: body['config.recording.enabled'] === 'on',
|
||||||
// Only include allowAccessTo if recording is enabled
|
// Only include allowAccessTo if recording is enabled
|
||||||
...(body['config.recordingConfig.enabled'] === 'on' && {
|
...(body['config.recording.enabled'] === 'on' && {
|
||||||
allowAccessTo: body['config.recordingConfig.allowAccessTo'] || 'admin_moderator_speaker'
|
allowAccessTo: body['config.recording.allowAccessTo'] || 'admin_moderator_speaker'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
virtualBackgroundConfig: {
|
virtualBackground: {
|
||||||
enabled: body['config.virtualBackgroundConfig.enabled'] === 'on'
|
enabled: body['config.virtualBackground.enabled'] === 'on'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
* Interface representing the config for a room.
|
* Interface representing the config for a room.
|
||||||
*/
|
*/
|
||||||
export interface MeetRoomConfig {
|
export interface MeetRoomConfig {
|
||||||
chatConfig: MeetChatConfig;
|
chat: MeetChatConfig;
|
||||||
recordingConfig: MeetRecordingConfig;
|
recording: MeetRecordingConfig;
|
||||||
virtualBackgroundConfig: MeetVirtualBackgroundConfig;
|
virtualBackground: MeetVirtualBackgroundConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user