feat: allow attendees to add guests to an event - #8719
Conversation
Organizers get a setting to let attendees of an event invite further people. Attendees can then add guests even though the event is otherwise read-only for them, and remove them again until the event is saved. The server reports guests off the base instance only, so the option needs the dav attendee_guests capability and is hidden for recurring events. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds attendee-managed guest invitations, gated by the dependent server capability.
Changes:
- Adds the organizer setting and event-property persistence.
- Allows attendees to add and temporarily remove guests.
- Adds capability and eligibility tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/Editor/Invitees/InviteesList.vue |
Enables guest management. |
src/components/Editor/Invitees/InviteesListItem.vue |
Adds temporary guest removal. |
src/mixins/EditorMixin.js |
Computes guest-invitation eligibility. |
src/mixins/PropertyMixin.js |
Registers the setting icon. |
src/models/event.js |
Maps the new event property. |
src/store/calendarObjectInstance.js |
Updates the persisted property. |
src/views/EditFull.vue |
Adds setting and guest controls. |
src/views/EditSimple.vue |
Enables guest controls. |
tests/javascript/unit/mixins/EditorMixin.test.js |
Tests eligibility rules. |
tests/javascript/unit/models/event.test.js |
Updates model expectations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| isForwardedByMe(attendee) { | ||
| // Not once the editor switched to viewing, because the guest reached | ||
| // the organizer by then and only they can remove an attendee | ||
| return this.canAddGuests | ||
| && this.forwardedAttendees.includes(removeMailtoPrefix(attendee.uri)) |
| :value="invitationForwarding" | ||
| @update:value="updateInvitationForwarding" /> | ||
| <PropertySelect | ||
| v-if="showAllowAttendeeGuests" |
|
Not sure about the approach tbh. Why do we need an additional "setting"/property and can not leverage the forwarding allowed condition? |
| <InviteesListSearch | ||
| v-if="!isReadOnly && hasUserEmailAddress" | ||
| v-if="(!isReadOnly || canAddGuests) && hasUserEmailAddress" | ||
| :alreadyInvitedEmails="alreadyInvitedEmails" | ||
| :organizer="calendarObjectInstance.organizer" | ||
| @addAttendee="addAttendee" /> | ||
| <OrganizerListItem | ||
| v-if="hasOrganizer" | ||
| :isReadOnly="isReadOnly" | ||
| :isSharedWithMe="isSharedWithMe" | ||
| :organizer="calendarObjectInstance.organizer" | ||
| :organizerSelection="organizerSelection" | ||
| :isViewedByOrganizer="isViewedByOrganizer" | ||
| @changeOrganizer="changeOrganizer" /> | ||
| <InviteesListItem | ||
| v-for="invitee in limitedInviteesWithoutOrganizer" | ||
| :key="invitee.email" | ||
| :attendee="invitee" | ||
| :isReadOnly="isReadOnly" | ||
| :canRemove="isForwardedByMe(invitee)" | ||
| :organizerDisplayName="organizerDisplayName" | ||
| :members="invitee.members" | ||
| :isViewedByOrganizer="isViewedByOrganizer" | ||
| @removeAttendee="removeAttendee" /> |
There was a problem hiding this comment.
Wasn't able to test this, the ability to add a guest is not working:
BEGIN:VEVENT
CREATED:20260817T025600Z
DTSTAMP:20260817T025715Z
LAST-MODIFIED:20260817T025715Z
SEQUENCE:3
UID:0c502dd7-9a7c-4488-8536-c4ba1de5db7e
DTSTART;TZID=Asia/Tashkent:20260820T100000
DTEND;TZID=Asia/Tashkent:20260820T110000
TRANSP:OPAQUE
STATUS:CONFIRMED
X-NC-INVITATION-FORWARDING:TRUE
SUMMARY:This is a test event
ATTENDEE;CN=user2@;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;ROLE=
REQ-PARTICIPANT;RSVP=TRUE:mailto:user2@
ORGANIZER;CN=User One:mailto:user1@
END:VEVENT
| calendarObjectInstance.eventComponent.updatePropertyWithValue('X-NC-ALLOW-ATTENDEE-GUESTS', allowAttendeeGuests) | ||
| calendarObjectInstance.allowAttendeeGuests = allowAttendeeGuests |
There was a problem hiding this comment.
I think this should be... "X-NC-INVITATION-FORWARDING"
| if (loadState('core', 'capabilities', {})?.dav?.attendee_guests !== true) { | ||
| return false | ||
| } |
Needs nextcloud/server#63167
Organizers get a setting to let attendees of an event invite further people. Attendees can then add guests even though the event is otherwise read-only for them, and remove them again until the event is saved.
The server reports guests off the base instance only, so the option needs the dav attendee_guests capability and is hidden for recurring events.
🤖 AI (if applicable)