Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2022-03-07 20:30:59 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2022-03-10 17:58:42 +0300
commit2dccc958d69016dc66647d9f8c8206cd9ed5af15 (patch)
tree82868bcf6e9f2b7211be5d6b4e48c508334b44de
parentfee59de0b77d4e010cd365b685e5295b108bd1ba (diff)
Fix loaded values in permissions dialog for participants
The "attendeePermissions" property provides the specific permissions for the participant. However, due to the permission chain the actual participant permissions may not be the default ones even if no custom attendee permissions are set. The dialog should show the actual participant permissions, so the "permissions" property should be used instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.spec.js4
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.vue10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.spec.js b/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.spec.js
index 00dec1b60..d98224cc4 100644
--- a/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.spec.js
+++ b/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.spec.js
@@ -24,7 +24,7 @@ describe('ParticipantPermissionsEditor.vue', () => {
actorId: 'alice-actor-id',
actorType: ATTENDEE.ACTOR_TYPE.USERS,
participantType: PARTICIPANT.TYPE.USER,
- attendeePermissions: PARTICIPANT.PERMISSIONS.CALL_START
+ permissions: PARTICIPANT.PERMISSIONS.CALL_START
| PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO
| PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO
| PARTICIPANT.PERMISSIONS.CUSTOM,
@@ -98,7 +98,7 @@ describe('ParticipantPermissionsEditor.vue', () => {
})
test('Properly renders the checkboxes with default permissions', async () => {
- participant.attendeePermissions = PARTICIPANT.PERMISSIONS.DEFAULT
+ participant.permissions = PARTICIPANT.PERMISSIONS.DEFAULT
const wrapper = await mountParticipantPermissionsEditor(participant)
const callStartCheckbox = wrapper.findComponent(PermissionsEditor).findComponent({ ref: 'callStart' })
expect(callStartCheckbox.vm.$options.propsData.checked).toBe(true)
diff --git a/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.vue b/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.vue
index 2f363f23d..08312e388 100644
--- a/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.vue
+++ b/src/components/RightSidebar/Participants/ParticipantsList/Participant/ParticipantPermissionsEditor/ParticipantPermissionsEditor.vue
@@ -23,7 +23,7 @@
<div class="wrapper">
<PermissionEditor
:display-name="displayName"
- :permissions="attendeePermissions"
+ :permissions="permissions"
v-on="$listeners"
@submit="handleSubmitPermissions" />
</div>
@@ -87,11 +87,11 @@ export default {
},
/**
- * Permisssions of the current participant, from the participants
- * store.
+ * Combined final permissions of the current participant, from the
+ * participants store.
*/
- attendeePermissions() {
- return this.participant.attendeePermissions
+ permissions() {
+ return this.participant.permissions
},
},