Skip to content

Commit

Permalink
Merge pull request #5451 from nextcloud/fix/scheduling/hide-free-busy…
Browse files Browse the repository at this point in the history
…-attendees

fix(scheduling): Disable free/busy for attendees
  • Loading branch information
ChristophWurst authored Sep 6, 2023
2 parents 1ba31cb + d9e67db commit a371db2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<NcButton v-if="!isReadOnly"
class="invitees-list-button-group__button"
:disabled="isListEmpty"
:disabled="isListEmpty || !isOrganizer"
@click="openFreeBusy">
{{ $t('calendar', 'Show busy times') }}
</NcButton>
Expand Down Expand Up @@ -128,6 +128,11 @@ export default {
return this.invitees
.filter(attendee => attendee.uri !== this.calendarObjectInstance.organizer.uri)
},
isOrganizer() {
return this.calendarObjectInstance.organizer !== null
&& this.$store.getters.getCurrentUserPrincipal !== null
&& removeMailtoPrefix(this.calendarObjectInstance.organizer.uri) === this.$store.getters.getCurrentUserPrincipal.emailAddress
},
hasOrganizer() {
return this.calendarObjectInstance.organizer !== null
},
Expand Down

0 comments on commit a371db2

Please sign in to comment.