Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/RightSidebar/Participants/Participant.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,11 +709,11 @@ describe('Participant.vue', () => {
await testCanBan()
})

test('allows a moderator to ban a federated user', async () => {
test('doesn not allow a moderator to ban a federated user', async () => {
conversation.participantType = PARTICIPANT.TYPE.MODERATOR
participant.actorType = ATTENDEE.ACTOR_TYPE.FEDERATED_USERS
participant.participantType = PARTICIPANT.TYPE.USER
await testCanBan()
await testCannotBan()
})

test('allows a moderator to ban a guest', async () => {
Expand Down
8 changes: 7 additions & 1 deletion src/components/RightSidebar/Participants/Participant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
:name="removeParticipantLabel"
:container="container">
<p> {{ removeDialogMessage }} </p>
<template v-if="supportBanV1 && showPermissionsOptions">
<template v-if="showBanOption">
<NcCheckboxRadioSwitch :checked.sync="isBanParticipant">
{{ t('spreed', 'Also ban from this conversation') }}
</NcCheckboxRadioSwitch>
Expand Down Expand Up @@ -742,6 +742,12 @@ export default {
return this.participantTypeIsModerator(this.participantType)
},

showBanOption() {
return this.supportBanV1
&& this.participant.actorType !== ATTENDEE.ACTOR_TYPE.FEDERATED_USERS
&& this.showPermissionsOptions
},

showPermissionsOptions() {
return this.canBeModerated
&& !this.isModerator
Expand Down