diff --git a/backend/openapi/components/responses/internal/success-get-room-roles.yaml b/backend/openapi/components/responses/internal/success-get-room-roles.yaml index bb5de30..c898c49 100644 --- a/backend/openapi/components/responses/internal/success-get-room-roles.yaml +++ b/backend/openapi/components/responses/internal/success-get-room-roles.yaml @@ -9,44 +9,26 @@ content: - role: 'moderator' permissions: livekit: - roomCreate: true roomJoin: true - roomList: true - roomRecord: true - roomAdmin: true room: 'room-123' - ingressAdmin: true canPublish: true canSubscribe: true canPublishData: true canUpdateOwnMetadata: true - hidden: false - recorder: false - agent: false openvidu: - canPublishScreen: true canRecord: true canChat: true canChangeVirtualBackground: true - role: 'publisher' permissions: livekit: - roomCreate: false roomJoin: true - roomList: true - roomRecord: false - roomAdmin: false room: 'room-123' - ingressAdmin: false canPublish: true canSubscribe: true canPublishData: true canUpdateOwnMetadata: true - hidden: false - recorder: false - agent: false openvidu: - canPublishScreen: true canRecord: false canChat: true canChangeVirtualBackground: true diff --git a/backend/openapi/components/schemas/internal/meet-room-role-permissions.yaml b/backend/openapi/components/schemas/internal/meet-room-role-permissions.yaml index 701c8b8..8aa2f81 100644 --- a/backend/openapi/components/schemas/internal/meet-room-role-permissions.yaml +++ b/backend/openapi/components/schemas/internal/meet-room-role-permissions.yaml @@ -15,41 +15,16 @@ properties: livekit: type: object properties: - roomCreate: - type: boolean - description: > - Indicates whether the participant can create a room. - example: true roomJoin: type: boolean description: > Indicates whether the participant can join a room. example: true - roomList: - type: boolean - description: > - Indicates whether the participant can list available rooms. - example: true - roomRecord: - type: boolean - description: > - Indicates whether the participant can record a room. - example: true - roomAdmin: - type: boolean - description: > - Indicates whether the participant has administrative privileges in the room. - example: true room: type: string description: > The ID of the room associated with the participant. example: roomId - ingressAdmin: - type: boolean - description: > - Indicates whether the participant can manage ingress settings. - example: true canPublish: type: boolean description: > @@ -70,29 +45,9 @@ properties: description: > Indicates whether the participant can update their own metadata. example: true - hidden: - type: boolean - description: > - Indicates whether the participant is hidden in the room. - example: false - recorder: - type: boolean - description: > - Indicates whether the participant is a recorder in the room. - example: false - agent: - type: boolean - description: > - Indicates whether the participant is an agent in the room. - example: false openvidu: type: object properties: - canPublishScreen: - type: boolean - description: > - Indicates whether the participant can publish screen sharing in the room. - example: true canRecord: type: boolean description: > diff --git a/backend/src/services/participant.service.ts b/backend/src/services/participant.service.ts index baf82f5..3d3d3eb 100644 --- a/backend/src/services/participant.service.ts +++ b/backend/src/services/participant.service.ts @@ -79,23 +79,14 @@ export class ParticipantService { protected generateModeratorPermissions(roomId: string): ParticipantPermissions { return { livekit: { - roomCreate: true, roomJoin: true, - roomList: true, - roomRecord: true, - roomAdmin: true, room: roomId, - ingressAdmin: true, canPublish: true, canSubscribe: true, canPublishData: true, - canUpdateOwnMetadata: true, - hidden: false, - recorder: false, - agent: false + canUpdateOwnMetadata: true }, openvidu: { - canPublishScreen: true, canRecord: true, canChat: true, canChangeVirtualBackground: true @@ -106,23 +97,14 @@ export class ParticipantService { protected generatePublisherPermissions(roomId: string): ParticipantPermissions { return { livekit: { - roomCreate: false, roomJoin: true, - roomList: true, - roomRecord: false, - roomAdmin: false, room: roomId, - ingressAdmin: false, canPublish: true, canSubscribe: true, canPublishData: true, - canUpdateOwnMetadata: true, - hidden: false, - recorder: false, - agent: false + canUpdateOwnMetadata: true }, openvidu: { - canPublishScreen: true, canRecord: false, canChat: true, canChangeVirtualBackground: true diff --git a/backend/tests/helpers/assertion-helpers.ts b/backend/tests/helpers/assertion-helpers.ts index 3b62083..ce9d292 100644 --- a/backend/tests/helpers/assertion-helpers.ts +++ b/backend/tests/helpers/assertion-helpers.ts @@ -6,6 +6,7 @@ import { MeetRecordingStatus, MeetRoom, MeetRoomPreferences, + ParticipantPermissions, ParticipantRole } from '../../src/typings/ce'; @@ -477,28 +478,19 @@ export const expectValidRoomRoleAndPermissionsResponse = ( }); }; -const getPermissions = (roomId: string, role: ParticipantRole) => { +const getPermissions = (roomId: string, role: ParticipantRole): ParticipantPermissions => { switch (role) { case ParticipantRole.MODERATOR: return { livekit: { - roomCreate: true, roomJoin: true, - roomList: true, - roomRecord: true, - roomAdmin: true, room: roomId, - ingressAdmin: true, canPublish: true, canSubscribe: true, canPublishData: true, - canUpdateOwnMetadata: true, - hidden: false, - recorder: false, - agent: false + canUpdateOwnMetadata: true }, openvidu: { - canPublishScreen: true, canRecord: true, canChat: true, canChangeVirtualBackground: true @@ -507,23 +499,14 @@ const getPermissions = (roomId: string, role: ParticipantRole) => { case ParticipantRole.PUBLISHER: return { livekit: { - roomCreate: false, roomJoin: true, - roomList: true, - roomRecord: false, - roomAdmin: false, room: roomId, - ingressAdmin: false, canPublish: true, canSubscribe: true, canPublishData: true, - canUpdateOwnMetadata: true, - hidden: false, - recorder: false, - agent: false + canUpdateOwnMetadata: true }, openvidu: { - canPublishScreen: true, canRecord: false, canChat: true, canChangeVirtualBackground: true